This repository was archived by the owner on Oct 21, 2022. It is now read-only.
Change failurePolicy to "Fail" and add reinvocationPolicy "IfNeeded"#265
Open
Neumann-Nils wants to merge 2 commits intomasterfrom
Open
Change failurePolicy to "Fail" and add reinvocationPolicy "IfNeeded"#265Neumann-Nils wants to merge 2 commits intomasterfrom
Neumann-Nils wants to merge 2 commits intomasterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR changes two things:
IgnoretoFail. I argue that it might be problematic if the Karydia webhook fails silently. It should rather fail and throw an error. Also seeFailurePolicyconsiderations #2https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#failure-policy
2. It sets the reinvocationPolicy to
IfNeeded. Thus, the webhook may be called if the object being admitted is modified by other webhooks after the initial webhook call. For example, if the Karydia webhook is invoked for an object and modifies it, another webhook could modify it later on, then the Karydia webhook should be called again to enforce the security policies.(For me it seems like this scenario is limited in the number of calls if changes appears on an already mutated object. See kubernetes/enhancements#1049).
https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#reinvocation-policy
Checklist
Before submitting this PR, please make sure:
makemake test