Skip to content

Commit

Permalink
Add kubernikus to k8s scheme to we can log events for our crd.
Browse files Browse the repository at this point in the history
  • Loading branch information
databus23 committed Nov 20, 2017
1 parent 94ac10f commit 4e4c6c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ func NewKubernikusOperator(options *KubernikusOperatorOptions) *KubernikusOperat

o.Clients.Satellites = kube.NewSharedClientFactory(secrets, klusters)

// Add kubernikus types to the default Kubernetes Scheme so events can be
// logged for those types.
v1.AddToScheme(scheme.Scheme)
eventBroadcaster := record.NewBroadcaster()
eventBroadcaster.StartLogging(glog.Infof)
eventBroadcaster.StartRecordingToSink(&typedcorev1.EventSinkImpl{Interface: o.Clients.Kubernetes.CoreV1().Events(o.Config.Kubernikus.Namespace)})
Expand Down

0 comments on commit 4e4c6c1

Please sign in to comment.