-
Notifications
You must be signed in to change notification settings - Fork 433
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
Support any bootstrap provider with MachinePools #5403
Support any bootstrap provider with MachinePools #5403
Conversation
Signed-off-by: Andrea Mazzotti <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @anmazzotti! |
Hi @anmazzotti. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
/ok-to-test |
@@ -258,12 +257,6 @@ func InitFlags(fs *pflag.FlagSet) { | |||
"Enable tracing to the opentelemetry-collector service in the same namespace.", | |||
) | |||
|
|||
fs.StringVar(&azureBootrapConfigGVK, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is flag removal considered a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. I think it is, but on the other hand this is still experimental and I doubt anyone is using it at the moment.
If we want to be extra safe I can simply keep it and just print an error(?) message informing the user it's deprecated.
/retest |
@anmazzotti: 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-sigs/prow repository. I understand the commands that are listed here. |
Switching the PR back to Draft as we just discussed in the CAPI community meeting a cleaner approach with dynamic watches. |
Closing this PR in favor of a better approach: #5416 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This patch makes the AzureMachinePool controller (Bootstrap)Config agnostic.
Instead watching
KubeadmConfigs
(or any other custom config added viabootstrap-config-gvk
argument), the controller is now watching any bootstrap secret directly, bypassing the config layer.As per bootstrap contract, the watch logic works in the following way:
cluster.x-k8s.io/cluster-name
labeled SecretsMachinePool
to enqueue an also relatedAzureMachinePool
reconcile.Note that since we are not watching KubeadmConfigs directly, the related RBAC permission was also cleaned up.
Since we don't actually trying to fetch any (Bootstrap)Config, there is no need for further RBAC settings when using other Bootstrap providers.
This should now also work in case of users providing their bootstrap Secret manually, assigning a custom
DataSecretName
in their (Bootstrap)Config. Still assuming they respect the contract linked above when creating the custom Secret.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes rancher/highlander#100
Special notes for your reviewer:
TODOs:
Release note: