-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
apiextensions: disallow metadata specs other than name and generateName #77653
apiextensions: disallow metadata specs other than name and generateName #77653
Conversation
63925bf
to
f2754f4
Compare
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
/assign @jpbetz |
f2754f4
to
2e187e1
Compare
/assign @liggitt @munnerz @DirectXMan12 |
/cc @ingvagabund |
@apelisse this will also answer the question of specifying |
2e187e1
to
d74a9a9
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt, sttts 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 |
Hi @sttts , with this MR, any idea of how we can add description to "custom" Cheers |
You cannot. ObjectMeta has – technically – generic semantics indpendently from the object at hand. But I see the use-case. For the moment, you can only put that documentation in some other field. |
Based on #77207.
Fixes #74620
CRDs should not restrict ObjectMeta fields other than name and generateName. Restricting other metadata values is considered breaking the API conventions. We better don't allow schemas which do that.
With structural schema introduction we have the chance to enforce this.
We do not care about
x-kubernetes-embedded-resource:true
andmetadata
there as those objects are not yet Kubernetes objects and the API server is not aware of them as resources.