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
Deletion verb interrupted by mutating handler #1762
Comments
Yeah, it used to be in I'm not sure should we just skip for deletion request here, or improve it like this:
I prefer the latter one, for it is a little weird if users enabled DELETE mutation and got nothing when objects deleted. |
@FillZpp Thanks! but I don't know what happens when mutations return some diff patches when sending DELETE verb? |
That's the problem. Could you run a test for the scenario? Or I can do this when I'm free in the new year :) |
Okay, I will try later, Happy New Year. |
@FillZpp Kubernetes seems unable to handle patches on DELETE verb in mutation handler, see from here mutating/dispatcher.go#L315, may we need to skip it?
|
Alright, if so, I think it is reasonable to skip this verb. What's more, I'm not sure if we should disable the DELETE verb in controller-tools so that it will not generate it in MutatingWebhookConfiguration or return an error to warn users that DELETE can not be used in mutating webhook? Any suggestions? @alvaroaleman @vincepri |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle rotten |
The fix was merged, why are we keeping this open? |
Oh sorry, my mistake. /close |
@FillZpp: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Environment
How to reproduce
kubectl delete <crd> <cr>
, its should returnsError from server: admission webhook "xxxxxx" denied the request: there is no content to decode
Possible Problems
when you want to delete a CR, mutaing handler want to
Decode(req.Object)
, however it doesn't work, cause Kubernetes DELETE Admission Request Body only containsOldObject
and the deletion verb is broken.can we skip deletion verb in the mutating handler?
Reference Issues
#1278
The text was updated successfully, but these errors were encountered: