Commit e35675cf authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #31821 from mwielgus/event-name-sync

Automatic merge from submit-queue Sync event names in federated controller cc: @quinton-hoole
parents f512ec3a 118de37d
...@@ -345,7 +345,7 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) { ...@@ -345,7 +345,7 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) {
for key, val := range baseIngress.ObjectMeta.Annotations { for key, val := range baseIngress.ObjectMeta.Annotations {
desiredIngress.ObjectMeta.Annotations[key] = val desiredIngress.ObjectMeta.Annotations[key] = val
} }
ic.eventRecorder.Eventf(baseIngress, api.EventTypeNormal, "UpdateCluster", ic.eventRecorder.Eventf(baseIngress, api.EventTypeNormal, "UpdateInCluster",
"Updating ingress in cluster %s", cluster.Name) "Updating ingress in cluster %s", cluster.Name)
operations = append(operations, util.FederatedOperation{ operations = append(operations, util.FederatedOperation{
...@@ -363,8 +363,8 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) { ...@@ -363,8 +363,8 @@ func (ic *IngressController) reconcileIngress(ingress types.NamespacedName) {
} }
glog.V(4).Infof("Calling federatedUpdater.Update() - operations: %v", operations) glog.V(4).Infof("Calling federatedUpdater.Update() - operations: %v", operations)
err = ic.federatedUpdater.UpdateWithOnError(operations, ic.updateTimeout, func(op util.FederatedOperation, operror error) { err = ic.federatedUpdater.UpdateWithOnError(operations, ic.updateTimeout, func(op util.FederatedOperation, operror error) {
ic.eventRecorder.Eventf(baseIngress, api.EventTypeNormal, "FailedClusterUpdate", ic.eventRecorder.Eventf(baseIngress, api.EventTypeNormal, "FailedUpdateInCluster",
"Update ingress in cluster %s failed: %v", op.ClusterName, operror) "Ingress update in cluster %s failed: %v", op.ClusterName, operror)
}) })
if err != nil { if err != nil {
glog.Errorf("Failed to execute updates for %s: %v", ingress, err) glog.Errorf("Failed to execute updates for %s: %v", ingress, err)
......
...@@ -289,7 +289,7 @@ func (nc *NamespaceController) reconcileNamespace(namespace string) { ...@@ -289,7 +289,7 @@ func (nc *NamespaceController) reconcileNamespace(namespace string) {
// Update existing namespace, if needed. // Update existing namespace, if needed.
if !util.ObjectMetaEquivalent(desiredNamespace.ObjectMeta, clusterNamespace.ObjectMeta) || if !util.ObjectMetaEquivalent(desiredNamespace.ObjectMeta, clusterNamespace.ObjectMeta) ||
!reflect.DeepEqual(desiredNamespace.Spec, clusterNamespace.Spec) { !reflect.DeepEqual(desiredNamespace.Spec, clusterNamespace.Spec) {
nc.eventRecorder.Eventf(baseNamespace, api.EventTypeNormal, "UpdateCluster", nc.eventRecorder.Eventf(baseNamespace, api.EventTypeNormal, "UpdateInCluster",
"Updating namespace in cluster %s", cluster.Name) "Updating namespace in cluster %s", cluster.Name)
operations = append(operations, util.FederatedOperation{ operations = append(operations, util.FederatedOperation{
...@@ -306,8 +306,8 @@ func (nc *NamespaceController) reconcileNamespace(namespace string) { ...@@ -306,8 +306,8 @@ func (nc *NamespaceController) reconcileNamespace(namespace string) {
return return
} }
err = nc.federatedUpdater.UpdateWithOnError(operations, nc.updateTimeout, func(op util.FederatedOperation, operror error) { err = nc.federatedUpdater.UpdateWithOnError(operations, nc.updateTimeout, func(op util.FederatedOperation, operror error) {
nc.eventRecorder.Eventf(baseNamespace, api.EventTypeNormal, "FailedClusterUpdate", nc.eventRecorder.Eventf(baseNamespace, api.EventTypeNormal, "UpdateInClusterFailed",
"Update namespace in cluster %s failed: %v", op.ClusterName, operror) "Namespace update in cluster %s failed: %v", op.ClusterName, operror)
}) })
if err != nil { if err != nil {
glog.Errorf("Failed to execute updates for %s: %v", namespace, err) glog.Errorf("Failed to execute updates for %s: %v", namespace, err)
......
...@@ -321,8 +321,8 @@ func (secretcontroller *SecretController) reconcileSecret(namespace string, secr ...@@ -321,8 +321,8 @@ func (secretcontroller *SecretController) reconcileSecret(namespace string, secr
} }
err = secretcontroller.federatedUpdater.UpdateWithOnError(operations, secretcontroller.updateTimeout, err = secretcontroller.federatedUpdater.UpdateWithOnError(operations, secretcontroller.updateTimeout,
func(op util.FederatedOperation, operror error) { func(op util.FederatedOperation, operror error) {
secretcontroller.eventRecorder.Eventf(baseSecret, api.EventTypeNormal, "FailedUpdateInCluster", secretcontroller.eventRecorder.Eventf(baseSecret, api.EventTypeNormal, "UpdateInClusterFailed",
"Update secret in cluster %s failed: %v", op.ClusterName, operror) "Secret update in cluster %s failed: %v", op.ClusterName, operror)
}) })
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment