diff --git a/internal/controller/controller.go b/internal/controller/controller.go index e73105d599..e4d550933d 100644 --- a/internal/controller/controller.go +++ b/internal/controller/controller.go @@ -368,22 +368,22 @@ func (lbc *LoadBalancerController) syncConfig(task queue.Task) { if updateErr != nil { eventTitle = "UpdatedWithError" eventType = api_v1.EventTypeWarning - eventWarningMessage = "but was not applied" + eventWarningMessage = fmt.Sprintf("but was not applied: %v", updateErr) } if configExists { cfgm := obj.(*api_v1.ConfigMap) - lbc.recorder.Eventf(cfgm, eventType, eventTitle, "Configuration from %v was updated %s: %v", key, eventWarningMessage, err) + lbc.recorder.Eventf(cfgm, eventType, eventTitle, "Configuration from %v was updated %s", key, eventWarningMessage) } for _, ingEx := range ingExes { - lbc.recorder.Eventf(ingEx.Ingress, eventType, eventTitle, "Configuration for %v/%v was updated %s: %v", - ingEx.Ingress.Namespace, ingEx.Ingress.Name, eventWarningMessage, err) + lbc.recorder.Eventf(ingEx.Ingress, eventType, eventTitle, "Configuration for %v/%v was updated %s", + ingEx.Ingress.Namespace, ingEx.Ingress.Name, eventWarningMessage) } for _, mergeableIng := range mergeableIngresses { master := mergeableIng.Master - lbc.recorder.Eventf(master.Ingress, eventType, eventTitle, "Configuration for %v/%v(Master) was updated %s: %v", master.Ingress.Namespace, master.Ingress.Name, eventWarningMessage, err) + lbc.recorder.Eventf(master.Ingress, eventType, eventTitle, "Configuration for %v/%v(Master) was updated %s", master.Ingress.Namespace, master.Ingress.Name, eventWarningMessage) for _, minion := range mergeableIng.Minions { - lbc.recorder.Eventf(minion.Ingress, eventType, eventTitle, "Configuration for %v/%v(Minion) was updated %s: %v", - minion.Ingress.Namespace, minion.Ingress.Name, eventWarningMessage, err) + lbc.recorder.Eventf(minion.Ingress, eventType, eventTitle, "Configuration for %v/%v(Minion) was updated %s", + minion.Ingress.Namespace, minion.Ingress.Name, eventWarningMessage) } } } @@ -533,11 +533,11 @@ func (lbc *LoadBalancerController) syncIng(task queue.Task) { if addErr != nil { eventTitle = "AddedOrUpdatedWithError" eventType = api_v1.EventTypeWarning - eventWarningMessage = "but was not applied" + eventWarningMessage = fmt.Sprintf("but was not applied: %v", addErr) } - lbc.recorder.Eventf(ing, eventType, eventTitle, "Configuration for %v(Master) was added or updated %s: %v", key, eventWarningMessage, err) + lbc.recorder.Eventf(ing, eventType, eventTitle, "Configuration for %v(Master) was added or updated %s", key, eventWarningMessage) for _, minion := range mergeableIngExs.Minions { - lbc.recorder.Eventf(ing, eventType, eventTitle, "Configuration for %v/%v(Minion) was added or updated %s: %v", minion.Ingress.Namespace, minion.Ingress.Name, eventWarningMessage, err) + lbc.recorder.Eventf(ing, eventType, eventTitle, "Configuration for %v/%v(Minion) was added or updated %s", minion.Ingress.Namespace, minion.Ingress.Name, eventWarningMessage) } if lbc.reportStatusEnabled() {