-
Notifications
You must be signed in to change notification settings - Fork 331
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
Consider putting the admission review on the webhook context #2656
Comments
Yes it does. It does not only help to prevent us from parsing the request again, but also helps not to consume the Request.Body bytes when we do so. |
/good-first-issue |
@dprotaso: Please ensure the request meets the requirements listed here. If this request no longer meets these requirements, the label can be removed In 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. |
/assign |
hey @dprotaso @elfotografo007 , could you give some pointers to where could I start looking into? |
First, you can check this PR. Reading the HTTP request body To accomplish this, you may need to create something similar to I really don't know about Knative internals so I cannot help you any further than this. |
I would also remove |
@elfotografo007 got it . |
When you read the bytes, they are consumed and gone forever. I mitigated the issue by using a TeeReader that reads the bytes and copies them back so they can be read again. This has a problem that if you read them again and don't copy them back, they are gone. |
This issue is stale because it has been open for 90 days with no |
/lifecycle frozen |
Would it make more sense for the
AdmissionRequest
go object to be on the context - instead of having the raw request body and parsing it again yourself?Originally posted by @dprotaso in #2583 (comment)
The text was updated successfully, but these errors were encountered: