func (c *ControllerV1) handleWebhookUpdate(oldObj, newObj interface{}) {
	if !c.isLeaderFunc() {
		return
	}

	newWebhook, ok := newObj.(*admiv1.MutatingWebhookConfiguration)
	if !ok {
		log.Debugf("Expected MutatingWebhookConfiguration object, got: %v", newObj)
		return
	}

	oldWebhook, ok := oldObj.(*admiv1.MutatingWebhookConfiguration)
	if !ok {
		log.Debugf("Expected MutatingWebhookConfiguration object, got: %v", oldObj)
		return
	}

	if newWebhook.ResourceVersion == oldWebhook.ResourceVersion {
		return
	}

	c.handleWebhook(newObj)
}
// handleWebhookUpdate handles the new Webhook reported in update events.
// It can be a callback function for update events.
handleWebhookUpdate handles the new Webhook reported in update events.
It can be a callback function for update events.
// handleWebhookUpdate handles the new Webhook reported in update events . // It can be a callback function for update events .
func (c *ControllerV1) handleWebhookUpdate(oldObj, newObj interface{}) {
	if !c.isLeaderFunc() {
		return
	}
	newWebhook, ok := newObj.(*admiv1.MutatingWebhookConfiguration)
	if !ok {
		log.Debugf("Expected MutatingWebhookConfiguration object, got: %v", newObj)
		return
	}
	oldWebhook, ok := oldObj.(*admiv1.MutatingWebhookConfiguration)
	if !ok {
		log.Debugf("Expected MutatingWebhookConfiguration object, got: %v", oldObj)
		return
	}
	if newWebhook.ResourceVersion == oldWebhook.ResourceVersion {
		return
	}
	c.handleWebhook(newObj)
}
func ( c * ControllerV1 ) handleWebhookUpdate ( oldObj , newObj interface { } ) { if ! c . isLeaderFunc ( ) { return } newWebhook , ok := newObj . ( * admiv1 . MutatingWebhookConfiguration ) if ! ok { log . Debugf ( " " , newObj ) return } oldWebhook , ok := oldObj . ( * admiv1 . MutatingWebhookConfiguration ) if ! ok { log . Debugf ( " " , oldObj ) return } if newWebhook . ResourceVersion == oldWebhook . ResourceVersion { return } c . handleWebhook ( newObj ) }
handleWebhookUpdate handles the new Webhook reported in update events.
handleWebhookUpdate handles the new Webhook reported in update events .