-
Notifications
You must be signed in to change notification settings - Fork 66
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
✨ Add featureGates to ControlPlaneProvider #536
base: main
Are you sure you want to change the base?
Conversation
[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 @kahirokunn! |
Hi @kahirokunn. 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. |
✅ Deploy Preview for kubernetes-sigs-cluster-api-operator ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
f0c4aea
to
4ba6b3e
Compare
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.
thanks a lot for this PR, can I you to add tests here https://github.com/kubernetes-sigs/cluster-api-operator/blob/main/test/e2e/helm_test.go?
@@ -49,6 +49,15 @@ metadata: | |||
"helm.sh/hook-weight": "2" | |||
{{- with .Values.configSecret }} | |||
spec: | |||
{{- if $.Values.manager }} | |||
manager: | |||
{{- if $.Values.manager.featureGates.kubeadm }} |
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.
can we make kubeadm
configurable here? for users that are not using kubeadm for bootstrapping
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.
@alexander-demicev
Sorry, I don't seem to understand correctly what you mean.
Could you please explain in more detail?
Thx.
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.
As changes may be made, the test is written after hearing the explanation.
Thx.
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.
@alexander-demicev remind 🙇♂️
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.
@kahirokunn current implementation always assumes that manager.featureGates
dictionary will use kubeadm
as a bootstrap provider and nothing else. However, there is a possibilty that, other bootstrap provider, like rke2
could be used instead of kubeadm
, so making manager.featureGates
configurable would makes sense here only if we could make the whole ControlPlaneProvider
type (starting from line 42) configurable including metadata.name
& metadata.namespace
.
@alexander-demicev perhaps we could keep it as is, since it is already kubeadm specific, WDYT?
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.
I wrote this because the file is specific to kubeadm
I wrote this because it is a kubeadm-specific file, and I thought it would be confusing if I wrote it in a standard way.
/ok-to-test |
/retest |
LGTM, but CI was not agreeing with me. Let's wait if retrigger helps (assuming it was a CI flake). |
@kahirokunn: 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. |
We would need to check in template if feature gates are set before trying to access them, so that tests won't fail |
What this PR does / why we need it:
This PR adds support for specifying featureGates in the ControlPlaneProvider. This is particularly necessary when using infrastructure=docker, as we need to pass CLUSTER_TOPOLOGY=true to the kubeadm provider. Currently, there is no way to do this, and this feature is essential for enabling cluster topology features in kubeadm.
Usage Example:
To use this feature, you can install the capi-operator with Helm and specify the feature gates in your values file. Here is an example:
example-values.yaml
:Sample Output:
Here is a portion of the expanded manifest showing the applied feature gates:
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 #