code: func (c *clientWrapper) UpdateIngressStatus(namespace, name, ip, hostname string) error {
  	if !c.isWatchedNamespace(namespace) {
  		return fmt.Errorf("failed to get ingress %s/%s: namespace is not within watched namespaces", namespace, name)
  	}
  
  	ing, err := c.factoriesKube[c.lookupNamespace(namespace)].Extensions().V1beta1().Ingresses().Lister().Ingresses(namespace).Get(name)
  	if err != nil {
  		return fmt.Errorf("failed to get ingress %s/%s: %v", namespace, name, err)
  	}
  
  	if len(ing.Status.LoadBalancer.Ingress) > 0 {
  		if ing.Status.LoadBalancer.Ingress[0].Hostname == hostname && ing.Status.LoadBalancer.Ingress[0].IP == ip {
  			// If status is already set, skip update
  			log.Debugf("Skipping status update on ingress %s/%s", ing.Namespace, ing.Name)
  			return nil
  		}
  	}
  	ingCopy := ing.DeepCopy()
  	ingCopy.Status = extensionsv1beta1.IngressStatus{LoadBalancer: corev1.LoadBalancerStatus{Ingress: []corev1.LoadBalancerIngress{{IP: ip, Hostname: hostname}}}}
  
  	_, err = c.csKube.ExtensionsV1beta1().Ingresses(ingCopy.Namespace).UpdateStatus(ingCopy)
  	if err != nil {
  		return fmt.Errorf("failed to update ingress status %s/%s: %v", namespace, name, err)
  	}
  	log.Infof("Updated status on ingress %s/%s", namespace, name)
  	return nil
  }
docs: // UpdateIngressStatus updates an Ingress with a provided status.