fix merge eror
@@ -101,6 +101,12 @@ func (t *Monitor) Run(register *Register, certRenewer *tls.CertRenewer, eventGen
if err := register.Register(); err != nil {
logger.Error(err, "Failed to register webhooks")
+ } else {
+ // if the status was false before then we update it to true
+ // send request to update the Kyverno deployment
+ if err := status.success(); err != nil {
+ logger.Error(err, "failed to annotate deployment webhook status to success")
+ }
}
continue
@@ -141,12 +147,6 @@ func (t *Monitor) Run(register *Register, certRenewer *tls.CertRenewer, eventGen
}
}
- // if the status was false before then we update it to true
- // send request to update the Kyverno deployment
- if err := status.success(); err != nil {
- logger.Error(err, "failed to annotate deployment webhook status to success")
- }
-
case <-stopCh:
// handler termination signal
logger.V(2).Info("stopping webhook monitor")
