Skip to content

Commit

Permalink
Update hcloud/cloud.go
Browse files Browse the repository at this point in the history
Co-authored-by: Julian Tölle <[email protected]>
  • Loading branch information
lukasmetzner and apricote authored Oct 31, 2024
1 parent 20e070a commit 30fe686
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hcloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ func (c *cloud) Initialize(clientBuilder cloudprovider.ControllerClientBuilder,
client, _ := clientBuilder.Client("hccm-event-broadcaster")

eventBroadcaster := record.NewBroadcaster()
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: "hcloud-cloud-controller-manager"})
eventBroadcaster.StartRecordingToSink(&v1.EventSinkImpl{Interface: client.CoreV1().Events("")})

c.recorder = recorder

go func() {
<-stop
eventBroadcaster.Shutdown()
}()

recorder := eventBroadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: "hcloud-cloud-controller-manager"})
c.recorder = recorder
}

func (c *cloud) Instances() (cloudprovider.Instances, bool) {
Expand Down

0 comments on commit 30fe686

Please sign in to comment.