// isDomainUnique compares domain with spec.domain of all ingress controllers
// and returns a false if a conflict exists or an error if the
// ingress controller list operation returns an error.
isDomainUnique compares domain with spec.domain of all ingress controllers
and returns a false if a conflict exists or an error if the
ingress controller list operation returns an error.
// isDomainUnique compares domain with spec . domain of all ingress controllers // and returns a false if a conflict exists or an error if the // ingress controller list operation returns an error .
func (r *reconciler) isDomainUnique(domain string) (bool, error) {
	ingresses := &operatorv1.IngressControllerList{}
	if err := r.cache.List(context.TODO(), ingresses, client.InNamespace(r.Namespace)); err != nil {
		return false, fmt.Errorf("failed to list ingresscontrollers: %v", err)
	}
	for _, ing := range ingresses.Items {
		if domain == ing.Status.Domain {
			log.Info("domain conflicts with existing IngressController", "domain", domain, "namespace",
				ing.Namespace, "name", ing.Name)
			return false, nil
		}
	}
	return true, nil
}
func ( r * reconciler ) isDomainUnique ( domain string ) ( bool , error ) { ingresses := & operatorv1 . IngressControllerList { } if err := r . cache . List ( context . TODO ( ) , ingresses , client . InNamespace ( r . Namespace ) ) ; err != nil { return false , fmt . Errorf ( " " , err ) } for _ , ing := range ingresses . Items { if domain == ing . Status . Domain { log . Info ( " " , " " , domain , " " , ing . Namespace , " " , ing . Name ) return false , nil } } return true , nil }
isDomainUnique compares domain with spec.domain of all ingress controllers
and returns a false if a conflict exists or an error if the
ingress controller list operation returns an error.
isDomainUnique compares domain with spec . domain of all ingress controllers and returns a false if a conflict exists or an error if the ingress controller list operation returns an error .
// Compare domain with all ingress controllers for a conflict.