-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Failing jobs when they are rejected by an admission webhook (#267)
* Failing jobs when they are rejected by an admission webhook When a job is rejected by adn admission webhook, this means it'll keep getting rejected so we should fail it so the user fix it. The "best" way to determine if it was a admission webhook that rejected it, is by looking for "admission webhook" in the message This is because: - Users can define their own return codes from webhooks (Although we could just fail all in the 4xx range - By default Kubernetes returns a 500 on validating webhook rejection. So this can't be differentiated from a genuine kubernetes failure (which we would want to retry on) Ideally Kubernetes changes the default to 4xx and we can just fail any pods when a 4xx response happens * Using constant * Adding go.sum changes
- Loading branch information
1 parent
2b8ee37
commit 11ddeb9
Showing
2 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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