-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
KCP/CABPK should reject known invalid Kubernetes versions #3697
Comments
Seems we're using this regex
|
cc @CecileRobertMichon as well, given that the regex came in #3147 |
@ncdc Not sure if you wanna tackle this in v0.3.x or later, if we do remove the underscore from the regex, it could technically break some controllers out there from patching, that said their clusters would already pretty much be broken at that point |
/milestone v0.4.0 |
@vincepri regex actually came from 32e6e61#diff-99f38c7c07bfcc03a528180716bafab5R58, I just reused the same one in webhook validation (couldn't use the one in util because it created a dependency cycle) |
Thanks, I wish we added a comment on where that regex came from :/ |
We can probably use this issue to align all our validations on Kubernetes versions, and use the exact same code / parsing everywhere |
@fabriziopandini What do you think the best way to proceed here? Are you able to work on this? |
Let me take a look tomorrow and try to get a picture of all the points where we are doing version validation before making an action plan |
@vincepri I have found following field in the API holding a Kubernetes version and the corresponding web hook validation:
So my plan is to craft a PR that ensures
|
/assign |
This might be a breaking change and cause a rollout in some cases |
/remove-lifecycle active |
/unassing @fabriziopandini |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/lifecycle frozen |
/priority important-soon |
/help |
@fabriziopandini: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed 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/test-infra repository. |
How would that work for folks using gitops? That would cause their changes to be overwritten, and possibly still causing a rollout if we overwrite their changes. I'd rather have the validation/defaulting/mutation be in a webhook, and return a warning (I think there is support for these now?) and in the next version we'd start breaking folks. I'd want to avoid any magic changes during upgrades using the CLI. |
/milestone Next |
/assign @killianmuldoon |
@fabriziopandini: Closing this issue. 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/test-infra repository. |
What steps did you take and what happened:
v1.19.1_mycompany.2
What did you expect to happen:
Anything else you would like to add:
For this example, a valid/appropriate version would be
v1.19.1+mycompany.2
.kubeadm only accepts valid semver values. We should consider adding webhook validations for both KCP and KubeadmConfig.
Environment:
/kind bug
/area control-plane
/area bootstrap
The text was updated successfully, but these errors were encountered: