// enforceIngressFinalizer adds IngressControllerFinalizer to ingress if it doesn't exist.
enforceIngressFinalizer adds IngressControllerFinalizer to ingress if it doesn't exist.
// enforceIngressFinalizer adds IngressControllerFinalizer to ingress if it doesn ' t exist .
func (r *reconciler) enforceIngressFinalizer(ingress *operatorv1.IngressController) error {
	if !slice.ContainsString(ingress.Finalizers, IngressControllerFinalizer) {
		ingress.Finalizers = append(ingress.Finalizers, IngressControllerFinalizer)
		if err := r.client.Update(context.TODO(), ingress); err != nil {
			return err
		}
		log.Info("enforced finalizer for ingress", "namespace", ingress.Namespace, "name", ingress.Name)
	}
	return nil
}
func ( r * reconciler ) enforceIngressFinalizer ( ingress * operatorv1 . IngressController ) error { if ! slice . ContainsString ( ingress . Finalizers , IngressControllerFinalizer ) { ingress . Finalizers = append ( ingress . Finalizers , IngressControllerFinalizer ) if err := r . client . Update ( context . TODO ( ) , ingress ) ; err != nil { return err } log . Info ( " " , " " , ingress . Namespace , " " , ingress . Name ) } return nil }
enforceIngressFinalizer adds IngressControllerFinalizer to ingress if it doesn't exist.
enforceIngressFinalizer adds IngressControllerFinalizer to ingress if it doesn ' t exist .