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

Automatic merge from submit-queue

Sync event names in federated controller

cc: @quinton-hoole
This commit is contained in:
Kubernetes Submit Queue 2016-09-01 01:48:25 -07:00 committed by GitHub
commit e35675cf59
3 changed files with 8 additions and 8 deletions

View File

@ -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) {
} }
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)

View File

@ -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) {
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)

View File

@ -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 {