-
Notifications
You must be signed in to change notification settings - Fork 463
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
Do not block pod creating on internal error in webhook #811
Conversation
Signed-off-by: Pavol Loffay <[email protected]>
@trutty would you like to review? |
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.
Could it lead to some other issues, if we return code 500 and an error message in the status result?
Signed-off-by: Pavol Loffay <[email protected]>
I cannot think of any. Do you have anything in mind? The error still gets propagated to the events but it does not block pod creation. |
No, i was just wondering. 👍 |
Signed-off-by: Pavol Loffay <[email protected]>
name: "empty payload", | ||
req: admission.Request{}, | ||
expected: http.StatusBadRequest, | ||
allowed: false, |
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.
Now the webhook fails the pod creation only if it cannot decode the request, which should not happen in practice.
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.
@trutty would you like to review?
Thanks @pavolloffay for the PR.
As stated, I am new to the inner workings of admission controller/webooks so my suggestion below could have faulty reasoning. Just wondering whether it is the best practice implementation 😉
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@open-telemetry/operator-maintainers could you please review? |
@jpkrohling @VineethReddy02 could you please review? |
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.
The original report is about auto-instrumentation webhooks, while this PR seems to fix this behavior for the sidecar injection. Are they both sharing the same function?
yes, both are sharing the same pod webhook skeleton. |
…y#811) * Do not block pod creating on internal error Signed-off-by: Pavol Loffay <[email protected]> * Fix Signed-off-by: Pavol Loffay <[email protected]> * Fix Signed-off-by: Pavol Loffay <[email protected]> * Add more docs Signed-off-by: Pavol Loffay <[email protected]> * Fix Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay [email protected]
Resolves #802