Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Stop logging broadcasted events in the operator
Browse files Browse the repository at this point in the history
And just broadcast the chart was synced, without implying success,
as the event will always fire regardless of the sync outcome.
  • Loading branch information
hiddeco committed Apr 10, 2019
1 parent 0e503ed commit 1485c8c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions integrations/helm/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"time"

"github.com/go-kit/kit/log"
"github.com/golang/glog"
"github.com/google/go-cmp/cmp"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -40,12 +39,9 @@ const (
// a HelmRelease fails to be released/updated
ErrChartSync = "ErrChartSync"

// MessageChartSynced - the message used for Events when a resource
// fails to sync due to failing to release the Chart
MessageChartSynced = "Chart managed by HelmRelease processed successfully"
// MessageErrChartSync - the message used for an Event fired when a HelmRelease
// is synced successfully
MessageErrChartSync = "Chart %s managed by HelmRelease failed to be processed"
// MessageChartSynced - the message used for an Event fired when a HelmRelease
// is synced.
MessageChartSynced = "Chart managed by HelmRelease processed"
)

// Controller is the operator implementation for HelmRelease resources
Expand Down Expand Up @@ -83,7 +79,6 @@ func New(
// logged for helm-operator types.
ifscheme.AddToScheme(scheme.Scheme)
eventBroadcaster := record.NewBroadcaster()
eventBroadcaster.StartLogging(glog.Infof)
eventBroadcaster.StartRecordingToSink(&typedcorev1.EventSinkImpl{Interface: kubeclientset.CoreV1().Events("")})
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: controllerAgentName})

Expand Down

0 comments on commit 1485c8c

Please sign in to comment.