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

"admission-webhook.openebs.io" does not support dry run #1771

Closed
mpartel opened this issue Nov 18, 2020 · 5 comments · Fixed by #1774
Closed

"admission-webhook.openebs.io" does not support dry run #1771

mpartel opened this issue Nov 18, 2020 · 5 comments · Fixed by #1774

Comments

@mpartel
Copy link

mpartel commented Nov 18, 2020

Description

When running kubectl diff or kubectl apply --dry-run on a config that defines a PersistentVolumeClaim, I get this error:
admission webhook "admission-webhook.openebs.io" does not support dry run

Possible Solution

You can mark the ValidatingWebhook resource that OpenEBS installs in webhook/configuration.go as sideEffects: None or NoneOnDryRun, assuming the webhook indeed has no side-effects.

I can make a PR if that helps, but I'd prefer if a dev could tell me whether the webhook has no side-effects rather than reading through all that the code myself.

@mpartel
Copy link
Author

mpartel commented Nov 19, 2020

Workaround: since maya doesn't overwrite the config if it exists, and since it appears there are no side-effects, it seems safe to modify the config after it appears.

@prateekpandey14
Copy link
Contributor

prateekpandey14 commented Dec 8, 2020

@mpartel i have tried to run the --dry-run command, but not getting any error, can you share the k8s version you are trying ?

$ kubectl apply --dry-run -f cstor-pvc.yaml
persistentvolumeclaim/cstor-test created (dry run)

Workaround: since maya doesn't overwrite the config if it exists, and since it appears there are no side-effects, it seems safe to modify the config after it appears.

Yes , there is no side-effects.

@mpartel
Copy link
Author

mpartel commented Dec 8, 2020

It was either 1.19.3 or 1.19.4

@prateekpandey14
Copy link
Contributor

Ok , i think you already tried by setting the SideEffects: None and it should work fine. I am going to raise a PR with that change anyways. thanks

@mpartel
Copy link
Author

mpartel commented Dec 8, 2020

Yeah, I've seen no problems having set that manually 👍
Thanks!

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 a pull request may close this issue.

2 participants