mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
pass in stopCh for GCE cluster ID controller
This commit is contained in:
parent
2908174517
commit
3521ebd1e7
@ -620,7 +620,7 @@ func (gce *GCECloud) Initialize(clientBuilder cloudprovider.ControllerClientBuil
|
||||
gce.eventRecorder = gce.eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "gce-cloudprovider"})
|
||||
}
|
||||
|
||||
go gce.watchClusterID()
|
||||
go gce.watchClusterID(stop)
|
||||
}
|
||||
|
||||
// LoadBalancer returns an implementation of LoadBalancer for Google Compute Engine.
|
||||
|
@ -59,7 +59,7 @@ type ClusterID struct {
|
||||
}
|
||||
|
||||
// Continually watches for changes to the cluster id config map
|
||||
func (gce *GCECloud) watchClusterID() {
|
||||
func (gce *GCECloud) watchClusterID(stop <-chan struct{}) {
|
||||
gce.ClusterID = ClusterID{
|
||||
cfgMapKey: fmt.Sprintf("%v/%v", UIDNamespace, UIDConfigMapName),
|
||||
client: gce.client,
|
||||
@ -105,7 +105,7 @@ func (gce *GCECloud) watchClusterID() {
|
||||
var controller cache.Controller
|
||||
gce.ClusterID.store, controller = cache.NewInformer(newSingleObjectListerWatcher(listerWatcher, UIDConfigMapName), &v1.ConfigMap{}, updateFuncFrequency, mapEventHandler)
|
||||
|
||||
controller.Run(nil)
|
||||
controller.Run(stop)
|
||||
}
|
||||
|
||||
// GetID returns the id which is unique to this cluster
|
||||
|
Loading…
Reference in New Issue
Block a user