Skip to content

Commit 54a27b2

Browse files
committed
provider recorder to attach detach controller
1 parent 1f06e15 commit 54a27b2

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

pkg/cmd/server/kubernetes/master.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ func (c *MasterConfig) RunPersistentVolumeController(client *client.Client, name
198198

199199
func (c *MasterConfig) RunPersistentVolumeAttachDetachController(client *client.Client) {
200200
s := c.ControllerManager
201+
eventBroadcaster := record.NewBroadcaster()
202+
eventBroadcaster.StartRecordingToSink(c.KubeClient.Events(""))
203+
recorder := eventBroadcaster.NewRecorder(kapi.EventSource{Component: "controller-manager"})
204+
201205
attachDetachController, err :=
202206
attachdetachcontroller.NewAttachDetachController(
203207
clientadapter.FromUnversionedClient(client),
@@ -207,7 +211,7 @@ func (c *MasterConfig) RunPersistentVolumeAttachDetachController(client *client.
207211
c.Informers.PersistentVolumes().Informer(),
208212
c.CloudProvider,
209213
kctrlmgr.ProbeAttachableVolumePlugins(s.VolumeConfiguration),
210-
nil,
214+
recorder,
211215
)
212216
if err != nil {
213217
glog.Fatalf("Failed to start attach/detach controller: %v", err)

vendor/k8s.io/kubernetes/pkg/volume/util/operationexecutor/operation_executor.go

+1-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)