Skip to content
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

Failing jobs when they are rejected by an admission webhook #267

Merged
merged 4 commits into from
Nov 29, 2019

Conversation

JamesMurkin
Copy link
Contributor

@JamesMurkin JamesMurkin commented Nov 29, 2019

When a job is rejected by an 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

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
@JamesMurkin
Copy link
Contributor Author

Fixes #261

@JamesMurkin JamesMurkin merged commit 11ddeb9 into master Nov 29, 2019
@JamesMurkin JamesMurkin deleted the fail-on-webhook-rejection branch November 29, 2019 16:11
svc-gh-ghzonetrans-p pushed a commit that referenced this pull request Oct 31, 2024
d80tb7 added a commit that referenced this pull request Oct 31, 2024
* [Simulator] Allow JobTemplates To Be Repeated (#267)

* wip

* wip

* wip

* F/chrisma/simulator repeated submission (#269)

* wip

* wip

* wip

* lint

* Update simulator.go

---------

Co-authored-by: Christopher Martin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants