-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Allowing type object in kubectl swagger validation #24054
Conversation
Labelling this PR as size/M |
Yes, I would like this to be cherrypicked so that we can change to |
GCE e2e build/test passed for commit 75895fa3ffeeb0972b22f92f5bf1d0a734fef7f1. |
@@ -118,7 +125,7 @@ func TestValid(t *testing.T) { | |||
for _, test := range tests { | |||
pod, err := readPod(test) | |||
if err != nil { | |||
t.Errorf("could not read file: %s", test) | |||
t.Errorf("could not read file: %s, err: %v", test, err) | |||
} | |||
err = schema.ValidateBytes([]byte(pod)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the []byte()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
if err != nil { | ||
t.Errorf("could not read file: %s, err: %v", test, err) | ||
} | ||
// Verify that pod has atleast one label (labels are type "any") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Only a few suggestions; feel free to LGTM after comments are addressed |
GCE e2e build/test passed for commit 3d27b7dcd54c14bec9ad695815a72fb8dac91b80. |
Thanks @janetkuo! |
GCE e2e build/test passed for commit b476ee4. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit b476ee4. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit b476ee4. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit b476ee4. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit b476ee4. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit b476ee4. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit b476ee4. |
Automatic merge from submit-queue |
Commit found in the "release-1.2" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
…y-pick-of-#24054-upstream-release-1.2 Automatic merge from submit-queue Automated cherry pick of kubernetes#24054 Cherry pick of kubernetes#24054 on release-1.2.
…y-pick-of-#24054-upstream-release-1.2 Automatic merge from submit-queue Automated cherry pick of kubernetes#24054 Cherry pick of kubernetes#24054 on release-1.2.
Allowing
"type": "object"
in kubectl swagger validation.We will cherrypick this in 1.2
This allows 1.2 kubectl to work with 1.3 api server which will use
"type":"object"
instead of"type":"any"
.Ref #4700 (comment)
cc @bgrant0607