-
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
Add immutable marker for fields in CRDs definitions #1524
Comments
@enxebre Which Kubernetes release is this being targeted for? Is this something that will fail gracefully when deployed on earlier versions of k8s, or will it introduce a hard requirement for a minimum version of k8s for the management cluster? |
It uses unknown fields from the point of view of an old kube version, and hence those fields are just ignored by an old API server. |
ok, so it sounds like we'd need to do validation through a webhook as well for enforcing this behavior until we can rely on a version of k8s that supports this natively. |
yes, if you want to enforce it for older kube versions. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
This work item is blocked on upstream support for now /priority backlog |
Given that this work is still in progress, and we'll need to tackle this in controller-runtime (and tools) first, what do you think of closing this for now? /remove-lifecycle frozen |
/area api |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/lifecycle frozen |
/remove-lifecycle frozen |
@vincepri: GitHub didn't allow me to assign the following users: to, re-prioritize. Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. 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. |
Initial proposal got merged kubernetes/enhancements#1265 but implementation efforts got stuck. I'll close this for now since no progress has been made for a while, I'll reopen if the effort is revived in api machinery. |
@enxebre: 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. |
@enxebre Doesn't solve immutability, but a similar effort which could be useful once it's implemented: https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/2876-crd-validation-expression-language (just wanted to share, in case you're not already aware of it) |
User Story
As a user I would like to be notified early about immutable fields for a better UX
As a developer I would like to notify early about immutable fields for a better UX and prevent not supported corner cases scenarios to take place.
Detailed Description
Once CRDs support immutable fields we need to add the immutable markers in the core API and providers where is relevant e.g https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/3abd1936dcae8dd5165f5cbc6b3ed5e568120286/controllers/awsmachine_controller.go#L380-L432
so we fail early before persisting providing a better experience.
Goals
Work for immutable fields:
kubernetes/enhancements#1265
kubernetes/kubernetes#83743
kubernetes-sigs/controller-tools#339
/kind feature
The text was updated successfully, but these errors were encountered: