Browse Source

Stop logging broadcasted events in the operator

And just broadcast the chart was synced, without implying success,
as the event will always fire regardless of the sync outcome.
Hidde Beydals 1 year ago
parent
commit
439787a983
1 changed files with 3 additions and 8 deletions
  1. 3
    8
      integrations/helm/operator/operator.go

+ 3
- 8
integrations/helm/operator/operator.go View File

@@ -7,7 +7,6 @@ import (
7 7
 	"time"
8 8
 
9 9
 	"github.com/go-kit/kit/log"
10
-	"github.com/golang/glog"
11 10
 	"github.com/google/go-cmp/cmp"
12 11
 	corev1 "k8s.io/api/core/v1"
13 12
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
@@ -40,12 +39,9 @@ const (
40 39
 	// a HelmRelease fails to be released/updated
41 40
 	ErrChartSync = "ErrChartSync"
42 41
 
43
-	// MessageChartSynced - the message used for Events when a resource
44
-	// fails to sync due to failing to release the Chart
45
-	MessageChartSynced = "Chart managed by HelmRelease processed successfully"
46
-	// MessageErrChartSync - the message used for an Event fired when a HelmRelease
47
-	// is synced successfully
48
-	MessageErrChartSync = "Chart %s managed by HelmRelease failed to be processed"
42
+	// MessageChartSynced - the message used for an Event fired when a HelmRelease
43
+	// is synced.
44
+	MessageChartSynced = "Chart managed by HelmRelease processed"
49 45
 )
50 46
 
51 47
 // Controller is the operator implementation for HelmRelease resources
@@ -83,7 +79,6 @@ func New(
83 79
 	// logged for helm-operator types.
84 80
 	ifscheme.AddToScheme(scheme.Scheme)
85 81
 	eventBroadcaster := record.NewBroadcaster()
86
-	eventBroadcaster.StartLogging(glog.Infof)
87 82
 	eventBroadcaster.StartRecordingToSink(&typedcorev1.EventSinkImpl{Interface: kubeclientset.CoreV1().Events("")})
88 83
 	recorder := eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: controllerAgentName})
89 84
 

Loading…
Cancel
Save