1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 10:28:36 +00:00

add debug log

This commit is contained in:
Shuting Zhao 2019-08-20 10:08:00 -07:00
parent 0157d80b2c
commit 54fc55f47a

View file

@ -436,12 +436,14 @@ func (pc *PolicyController) handleWebhookRegistration(emptyPolicy bool) error {
if emptyPolicy {
// deregister webhookconfigurations it it exists
if list != nil {
glog.V(3).Infoln("No policy found in the cluster, deregistering webhook")
pc.webhookRegistrationClient.DeregisterMutatingWebhook()
}
return nil
}
if list == nil {
glog.V(3).Infoln("Found policy without mutatingwebhook, registering webhook")
pc.webhookRegistrationClient.RegisterMutatingWebhook()
}