-
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
Add support for submitting/receiving CRD objects as yaml #58260
Conversation
Updated with integration test:
|
cc @kubernetes/sig-api-machinery-pr-reviews |
// TODO: handle this in negotiation | ||
contentType := req.Header.Get("Content-Type") | ||
// Remove "; charset=" if included in header. | ||
if idx := strings.Index(contentType, ";"); idx > 0 { |
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.
nit: >= 0
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.
Preexisting, and I don't think so… leading ; isn't a valid mime type attribute
return func(w http.ResponseWriter, req *http.Request) { | ||
// Do this first, otherwise name extraction can fail for unrecognized content types | ||
// TODO: handle this in negotiation |
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.
what's meant with the TODO? (I know it pre-existed)
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.
It means to switch this to follow a similar flow with the negotiating serializer, that's just not built for dealing with patch mime types as-is
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.
was reading "in negation". negotiation makes more sense actually.
Looks good. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, liggitt Associated issue: #37455 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
@liggitt: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
Automatic merge from submit-queue (batch tested with PRs 58260, 58326). If you want to cherry-pick this change to another branch, please follow the instructions here. |
Fixes #37455