rancher / cluster-api-provider-rke2

RKE2 bootstrap and control-plane Cluster API providers.
https://rancher.github.io/cluster-api-provider-rke2/
Apache License 2.0
84 stars 30 forks source link

RKE2ControlPlane is tainting control-plane nodes #501

Closed bcdurden closed 1 hour ago

bcdurden commented 2 hours ago

What happened: When creating an RKE2 Control-Plane node using a RKE2ControlPlane CR, the node is being tainted by default.

What did you expect to happen: The node should not be tainted by default as this deviates from pre-existing RKE2 installation methods.

How to reproduce it: Try to create a RKE2 CAPI cluster with 3 control plane nodes and 0 workers.

Anything else you would like to add: There also doesn't appear to be any method of defining the taints on a node as part of an override that I can see within the RKE2ControlPlane CRD. The agentConfig.nodeTaints field appears to be ignored. Because of this, making a Rancher-manager cluster that is typically comprised of 3 controlplane/worker hybrid nodes is not possible without some config hacks.

I get there's been past history of how RKE2 does not taint its nodes by default. If there's been a deviation, there should be at least a way to clear the taints.

Environment: Any

bcdurden commented 1 hour ago

I found the cause of my issue. However, nodeTaints is still ignored here. Probably needs a separate bug report for that.