// We always first create an ingress in the first available cluster. Once that ingress
// We always first create an ingress in the first available cluster. Once that ingress
// has been created and allocated a global IP (visible via an annotation),
// we record that annotation on the federated ingress, and create all other cluster
// ingresses with that same global IP.
// Note: If the first cluster becomes (e.g. temporarily) unavailable, the second cluster will be allocated
// index 0, but eventually all ingresses will share the single global IP recorded in the annotation
// of the federated ingress.
ifbaseIPAnnotationExists||(clusterIndex==0){
glog.V(4).Infof("No existing Ingress %s in cluster %s (index %d) and static IP annotation (%q) on base ingress - queuing a create operation",ingress,cluster.Name,clusterIndex,staticIPNameKeyWritable)
// Note: If the first cluster becomes (e.g. temporarily) unavailable, the
// second cluster will become the first cluster, but eventually all ingresses
// will share the single global IP recorded in the annotation of the
glog.V(4).Infof("No existing Ingress %s in cluster %s and static IP annotation (%q) exists on base ingress - queuing a create operation",ingress,cluster.Name,staticIPNameKeyWritable)
}else{
glog.V(4).Infof("No existing Ingress %s in cluster %s and no static IP annotation (%q) on base ingress - queuing a create operation in first cluster",ingress,cluster.Name,staticIPNameKeyWritable)
glog.V(4).Infof("No annotation %q exists on ingress %q in federation, and index of cluster %q is %d and not zero. Not queueing create operation for ingress %q until annotation exists",staticIPNameKeyWritable,ingress,cluster.Name,clusterIndex,ingress)
glog.V(4).Infof("No annotation %q exists on ingress %q in federation and waiting for ingress in cluster %s. Not queueing create operation for ingress until annotation exists",staticIPNameKeyWritable,ingress,firstClusterName)
if(!baseIPAnnotationExists&&clusterIPNameExists)||(!baseLBStatusExists&&clusterLBStatusExists){// copy the IP name from the readonly annotation on the cluster ingress, to the writable annotation on the federated ingress