How to categorize this issue?
/kind question
/priority normal
What happened:
validate-namespace-deletion webhook is called 2 times for single ns delete request.
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
$ k delete ns $PROJECT_NS
validate-namespace-deletion webhook is called 2 times:time="2020-06-08T18:10:08+03:00" level=info msg="Rejected 'DELETE namespace' request of user 'minikube-user': Direct deletion of namespace \"<PROJECT_NS>\" is not permitted (you must delete the corresponding project \"<PROJECT>\")."
time="2020-06-08T18:10:08+03:00" level=info msg="Rejected 'DELETE namespace' request of user 'minikube-user': Direct deletion of namespace \"<PROJECT_NS>\" is not permitted (you must delete the corresponding project \"<PROJECT>\")."
Anything else we need to know?:
Environment:
kubectl version):/close
I also observed this behaviour for other admission plugins (also for UPDATE calls).
For example, if the ShootValidator denies the request (for example disallows finalizer removal), then it will be immediately invoked again.
It took a quick look and this seems to be done on purpose from the apiserver library, but I am not sure, what is the actual reason for it and if we can/should avoid or reconfigure it.
I also observed this behaviour for other admission plugins (also for UPDATE calls).
For example, if the ShootValidator denies the request (for example disallows finalizer removal), then it will be immediately invoked again.It took a quick look and this seems to be done on purpose from the apiserver library, but I am not sure, what is the actual reason for it and if we can/should avoid or reconfigure it.
Generally I observed the same with out ShootValidators and initially started the investigation about them. Then I saw the same happening for validate-namespace-deletion webhook and spend effort on reproducing the issue with it.