Closed iiiceoo closed 1 year ago
I encountered the same problem as in #1762. When I delete the CR, the error "there is no content to decode"
is returned from the mutating webhook.
The only difference is that I registered webhook for CR in the following way:
return ctrl.NewWebhookManagedBy(sm.runtimeMgr).
For(&xxx.CR{}).
WithDefaulter(sm).
WithValidator(sm).
Complete()
Then I found that the bug was only solved in the handler of interface Defaulter
, but not in interface CustomDefaulter
.
Version
Reproduce
kubectl delete <CRD> <CR>
, and get error message"there is no content to decode"
.Reference
1762
1765