-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse CAPI bootstrap secret with Supervisor #1584
Reuse CAPI bootstrap secret with Supervisor #1584
Conversation
dea2b70
to
ef25aaf
Compare
This patch removes the logic for creating a new ConfigMap resource for Supervisor VMs. Instead CAPV simply points the Supervisor resources to the existing CAPI bootstrap secrets. Previously Supervisor integration required setting the ControlPlaneEndpoint value in Cloud-Init metadata. However, this was recognized as vestigial as the KubeadmBootstrap controller automatically grabs the ControlPlaneEndpoint from the Cluster.Spec.ControlPlaneEndpoint field if the value is not explicitly specified. For more information please see the following links: * The CAPV Cluster reconciler does not proceed until there is a control plane endpoint -- https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/cc735927f7c7671dc8f30bc796474fa62555a127/controllers/vmware/vspherecluster_reconciler.go#L184-L188 * The CAPV Cluster reconciler only marks the Cluster as "ready" when there is a valid control plane endpoint -- https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/cc735927f7c7671dc8f30bc796474fa62555a127/controllers/vmware/vspherecluster_reconciler.go#L190 * The CAPI Core KubeadmBootstrap reconciler does not proceed unless the Cluster is marked as "ready" -- https://github.com/kubernetes-sigs/cluster-api/blob/bc177c6906e8b7063520777c2d608b7297fd86b9/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go#L234-L238 * The CAPI Core KubeadmBootstrap reconciler uses the value of Cluster.Spec.ControlPlaneEndpoint if one is not provided explicitly -- https://github.com/kubernetes-sigs/cluster-api/blob/ffee0a45cf823965d6e6d578d93eb3b6730ec734/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go#L925-L931 * The CAPV Machine reconciler does not proceed until the bootstrap data is ready -- https://github.com/kubernetes-sigs/cluster-api-provider-vsphere/blob/cc735927f7c7671dc8f30bc796474fa62555a127/controllers/vspheremachine_controller.go#L292-L302
ef25aaf
to
4ca52b0
Compare
@akutz: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: srm09 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This patch removes the logic for creating a new ConfigMap resource for Supervisor VMs. Instead CAPV simply points the Supervisor resources to the existing CAPI bootstrap secrets.
Previously Supervisor integration required setting the ControlPlaneEndpoint value in Cloud-Init metadata.
However, this was recognized as vestigial as the KubeadmBootstrap controller automatically grabs the
ControlPlaneEndpoint from the Cluster.Spec.ControlPlaneEndpoint field if the value is not explicitly specified.
For more information please see the following links:
cluster-api-provider-vsphere/controllers/vmware/vspherecluster_reconciler.go
Lines 184 to 188 in cc73592
Cluster.Spec.ControlPlaneEndpoint
to the value of the load balancercluster-api-provider-vsphere/controllers/vmware/vspherecluster_reconciler.go
Lines 254 to 255 in cc73592
cluster-api-provider-vsphere/controllers/vmware/vspherecluster_reconciler.go
Line 190 in cc73592
Cluster.Spec.ControlPlaneEndpoint
if one is not provided explicitlycluster-api-provider-vsphere/controllers/vspheremachine_controller.go
Lines 292 to 302 in cc73592
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):NA
Special notes for your reviewer:
Please note that I raised the failing
go-apidiff
test with @srm09 in internal Slack:Therefore it seems like we are okay moving ahead with this PR with that test failing. If anyone has any concerns, please let me know. Thanks!
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
Release note: