apiextensions: allow "required" at root with status subresource#63533
Conversation
|
LGTM. |
ed0f9f9 to
270b5c6
Compare
There was a problem hiding this comment.
Since we are only allowing this for status, I think the error message should be something like "if status subresource is enabled..."
|
There is an integration test which checks that nothing other than properties should be present at the root, this is failing now. I guess we can remove that test. Apart from these, lgtm. 👍 |
270b5c6 to
a9db48d
Compare
|
Test fixed. |
|
Volume flake. /retest |
a9db48d to
1558da1
Compare
|
/retest |
|
@sttts: you cannot LGTM your own PR. DetailsIn 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Automatic merge from submit-queue (batch tested with PRs 59034, 63565, 63533). If you want to cherry-pick this change to another branch, please follow the instructions here. |
In the subresources alpha we intentionally disallowed anything than
propertiesat the root of the validation schema in order to allow us to project it to the .status subtree. By doing this we also disallowedrequiredat the root which is necessary to enforce e.g. a spec to be set. This PR fixes this.Moreover, it fixes that the restriction is only enforced when the status subresource is actually enabled. Before this PR we were enforcing the restriction as soon as the feature gate was enabled, leading to a backwards incompatible change.
There was an issue reporting the bug. But cannot find it.