clusterObj,clusterErr:=api.Scheme.DeepCopy(cluster)// Make a clone so that we don't clobber our input param
cluster,ok:=clusterObj.(*federationapi.Cluster)
ifclusterErr!=nil||!ok{
glog.Errorf("Internal error: Failed clone cluster resource while attempting to add master ingress UID annotation (%q = %q) from master cluster %q to cluster %q, will try again later: %v",uidAnnotationKey,masterUID,masterCluster.Name,cluster.Name,clusterErr)
return"",clusterErr
}
cluster=cluster.DeepCopy()// Make a clone so that we don't clobber our input param
iferr==nil{
ifmasterCluster.Name!=cluster.Name{// We're not the master, need to get in sync
glog.Errorf("Internal Error %v : Object retrieved from ingressInformerStore with key %q is not of correct type *extensionsv1beta1.Ingress: %v",err,key,baseIngressObj)
glog.Errorf("Internal error: Failed to clone LoadBalancerStatus of %q in cluster %q while attempting to update master loadbalancer ingress status, will try again later. error: %v, Object to be cloned: %v",ingress,cluster.Name,lbErr,lbstatusObj)
glog.V(4).Infof("Ingress %q in cluster %q does not need an update: cluster ingress is equivalent to federated ingress",ingress,cluster.Name)
}else{
glog.V(4).Infof("Ingress %s in cluster %s needs an update: cluster ingress %v is not equivalent to federated ingress %v",ingress,cluster.Name,clusterIngress,desiredIngress)