-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🐛 Relax minLength for bootstrap.dataSecretName to 0 #12164
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
🐛 Relax minLength for bootstrap.dataSecretName to 0 #12164
Conversation
/cc @sbueringer |
Thank you for this! |
LGTM label has been added. Git tree hash: 6c8de6c1cd29aca39dd336a0b4546570f37a6c26
|
/cherry-pick release-1.10 |
@sbueringer: once the present PR merges, I will cherry-pick it on top of In response to this:
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. |
@mboersma One question |
@@ -696,7 +696,7 @@ type Bootstrap struct { | |||
// dataSecretName is the name of the secret that stores the bootstrap data script. | |||
// If nil, the Machine should remain in the Pending state. | |||
// +optional | |||
// +kubebuilder:validation:MinLength=1 | |||
// +kubebuilder:validation:MinLength=0 |
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.
consider make this not a pointer in v1beta2 based on the outcome of #12153 (comment)
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 think that should not be part of this PR as this PR is a bug fix for a specific issue and we'll also backport it
94e077b
to
6597677
Compare
What is the use case for setting dataSecretName to ""? |
In an Azure managed MachinePool, for example, Now with CAPI v1.10.x, we see this error:
We've had a couple customers report it already, even though we haven't finished integrating CAPI v1.10 yet because of this. We can work around it in CAPZ by setting the |
I think we can debate what to do for v1beta2, but for v1beta1 we have to allow minLength=0 again and should make that change ASAP. Otherwise we keep a change in v1.10 that breaks MachinePool implementations across a few providers (which is definitely a breaking change, and we should not do that within v1beta1) |
/lgtm |
LGTM label has been added. Git tree hash: 4c6ff23cbe7cde2f98278a40e38c44f611b46557
|
This is a similar situation for AWS MachinePools |
In my opinion this is another reason why we should stop reusing the MachineSpec struct between MD and MP. We would be able to clean this up for MD/MS/Machine without breaking MP if we wouldn't reuse the struct (edit, ah nope, MachinePool Machines doesn't allow that...) |
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.
/lgtm
Is there a specific approver for this, or is it you @sbueringer ?
I would like to wait for a response from Fabrizio |
cc @fabriziopandini ^^ |
I'm ok in unblocking this fix for v1beta1/v1.10, but I would like we seek for a better solution for v1beta2 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini 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 |
@sbueringer: #12164 failed to apply on top of branch "release-1.10":
In response to this:
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. |
Thanks! Can we get v1.10.2? |
It first needs a PR to cherry-pick it to release-1.10 branch. If I'm right and plans do not change, v1.10.2 is planned to be released on 20th may. https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/release/releases/release-1.11.md |
I see. An earlier patch release will be much appreciated as v0.10.x release of capz/capg/capa all are blocked on this pr. |
I think you have to discuss this with the release team. Btw this could have been detected earlier by bumping to beta.0 or any of the subsequent pre releases. |
Can someone open a manual cherry-pick for release-1.10 please? |
@richardcase @mboersma Can one of you please open an issue for that? I'll then link it accordingly in the v1beta2 & "Graduate MachinePool" umbrella issues. |
I'll add it to the list tracking issue for v1beta2 machinepools |
Here is the backport PR @sbueringer #12180 |
What this PR does / why we need it:
Changes the validation for Machine spec's
bootstrap.dataSecretName
to// +kubebuilder:validation:MinLength=0
. This allows an empty string, which is an existing use case for managed MachinePools.Which issue(s) this PR fixes:
Fixes #12161
/area bootstrap