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

Removes admission.Errored responses from podmutator webhook #604

Merged
merged 4 commits into from
Mar 8, 2022

Conversation

0sewa0
Copy link
Contributor

@0sewa0 0sewa0 commented Mar 1, 2022

Description

On OLM the namespaceSelector in the MutatingWebhookConfiguration is ignored. This leads to the Webhook intercepting Pod Creation for every pod in the Cluster, independent of the namespaceSelector in the Dynakube and the corresponding label on the namespace managed by the Operator.
The failurePolicy is set to ignore, with a timeout of 2s, but since the Webhook returns an error response before the 2s are up, the pod is blocked from being created.

How can this be tested?

No matter what, the webhook will not stop the scheduling of a pod because of an error, instead the error's text should be in the message.

Checklist

  • Unit tests have been updated/added
  • PR is labeled accordingly

@0sewa0 0sewa0 added the core Changes to core functionality of the Operator label Mar 1, 2022
@0sewa0 0sewa0 requested a review from a team March 1, 2022 13:39
src/webhook/mutation/pod_mutator.go Outdated Show resolved Hide resolved
@0sewa0 0sewa0 requested a review from luhi-DT March 8, 2022 09:50
@0sewa0 0sewa0 enabled auto-merge (squash) March 8, 2022 09:56
@0sewa0 0sewa0 merged commit 3dff522 into master Mar 8, 2022
@0sewa0 0sewa0 deleted the feature/no-error-webhook branch March 8, 2022 10:05
chrismuellner pushed a commit that referenced this pull request Mar 8, 2022
chrismuellner pushed a commit that referenced this pull request Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to core functionality of the Operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants