-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Mark Conditions in CustomResourceDefinitionStatus as optional #64996
Mark Conditions in CustomResourceDefinitionStatus as optional #64996
Conversation
Seeing this being inconsistent for a number of types (when searching for |
@sttts Did a search under The problem is that we don't (and probably cannot?) have API conventions to reason about if an arbitrary API field should be optional, so we have to fix them one by one.
|
Which means a number of follow-ups? |
@roycaihw can you formulate the release-note in JSON terms to be understandable by users? Otherwise, lgtm. |
/lgtm |
/approve I edited the release note. |
@lavalamp Thanks. I was thinking about the point that @smarterclayton made in #65041 (comment). Marking these beta fields /hold
@sttts Yes I can file an issue for those |
I understand apiserver already omits the key completely if the list is empty, and is therefore violating the spec, correct? (per kubernetes-client/gen#52) Is this true for json, proto, both, or neither? Please confirm this before we proceed onto the next step :) Assuming we are in violation of the spec, we can either fix the spec or fix our behavior. I think fixing the spec is less disruptive overall. Therefore, I agree with this change and think it is allowable, pending double-checking today's behavior. |
When you say fixing spec, you mean "tell people to just set +optional in their Godoc without setting omitempty, document that existing fields should never be marked omitempty once they hit beta, and new fields can continue to be created as omitempty"? That would still mark the field optional in OpenAPI, and would preserve the semantics for users. |
/test all Tests are more than 96 hours old. Re-running tests. |
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. |
Stale issues rot after 30d 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. |
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. |
staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go
Show resolved
Hide resolved
needs update to include v1 API type as well |
2c6fba8
to
b614879
Compare
thanks. Updated |
/retest
quite rare according to: https://storage.googleapis.com/k8s-gubernator/triage/index.html?pr=1&text=Precondition%20failed%3A%20UID%20in%20precondition |
/retest missed |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lavalamp, liggitt, roycaihw, 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 |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
What this PR does / why we need it:
Apiserver may respond
null
for required propertyConditions
inmetav1.CustomResourceDefinitionStatus
(e.g. create a crd withkubectl --v=9
and check the response), which fails the validation in generated python client kubernetes-client/python#415. This PR marks the field as optional.Release note:
/sig api-machinery
/area custom-resources