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

[bug]: Validating webhook may not return response.patchType #536

Closed
tomasfabian opened this issue Feb 23, 2023 · 0 comments · Fixed by #537
Closed

[bug]: Validating webhook may not return response.patchType #536

tomasfabian opened this issue Feb 23, 2023 · 0 comments · Fixed by #537
Labels
bug Something isn't working

Comments

@tomasfabian
Copy link
Contributor

tomasfabian commented Feb 23, 2023

Describe the bug

After migrating to version v7.0.9 we received the following error during applying a CR from kubectl:

Validating webhook may not return response.patchType

The error is thrown by the api server. It ensures that a validating webhook doesn't return patch or patchType.

This is caused by the fact that the PatchType property's type was changed from a nullable string to a regular string and by setting a default value for it.

I will prepare a PR.

To reproduce

Create a validation webhook and apply a resource to the k8s cluster.

@tomasfabian tomasfabian added the bug Something isn't working label Feb 23, 2023
buehler pushed a commit that referenced this issue Feb 27, 2023
This PR changes back the AdmissionResponse.PatchType to an optional
value #536 since validation web hooks cannot contain a PatchType.

Fixes #536
buehler added a commit that referenced this issue Mar 1, 2023
…n mutating webhooks (#540)

…in mutating webhooks for modifications. This is a follow up fix for
#536 #537.

Co-authored-by: Christoph Bühler <buehler@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant