func (c *ControllerV1) reconcile() error {
	secret, err := c.getSecret()
	if err != nil {
		return err
	}

	webhook, err := c.webhooksLister.Get(c.config.getWebhookName())
	if err != nil {
		if errors.IsNotFound(err) {
			log.Infof("Webhook %s was not found, creating it", c.config.getWebhookName())
			return c.createWebhook(secret)
		}

		return err
	}

	log.Debugf("The Webhook %s was found, updating it", c.config.getWebhookName())

	return c.updateWebhook(secret, webhook)
}
// reconcile creates/updates the webhook object on new events.
reconcile creates/updates the webhook object on new events.
// reconcile creates / updates the webhook object on new events .
func (c *ControllerV1) reconcile() error {
	secret, err := c.getSecret()
	if err != nil {
		return err
	}
	webhook, err := c.webhooksLister.Get(c.config.getWebhookName())
	if err != nil {
		if errors.IsNotFound(err) {
			log.Infof("Webhook %s was not found, creating it", c.config.getWebhookName())
			return c.createWebhook(secret)
		}
		return err
	}
	log.Debugf("The Webhook %s was found, updating it", c.config.getWebhookName())
	return c.updateWebhook(secret, webhook)
}
func ( c * ControllerV1 ) reconcile ( ) error { secret , err := c . getSecret ( ) if err != nil { return err } webhook , err := c . webhooksLister . Get ( c . config . getWebhookName ( ) ) if err != nil { if errors . IsNotFound ( err ) { log . Infof ( " " , c . config . getWebhookName ( ) ) return c . createWebhook ( secret ) } return err } log . Debugf ( " " , c . config . getWebhookName ( ) ) return c . updateWebhook ( secret , webhook ) }
reconcile creates/updates the webhook object on new events.
reconcile creates / updates the webhook object on new events .