Merge pull request #82865 from tnqn/endpointslice

Fix wrong comments and inaccurate logs in endpointslice_controller
This commit is contained in:
Kubernetes Prow Robot 2019-10-08 15:42:16 -07:00 committed by GitHub
commit b4489d1709
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,14 +137,14 @@ type Controller struct {
// Added as a member to the struct to allow injection for testing.
podsSynced cache.InformerSynced
// endpointSliceLister is able to list/get pods and is populated by the
// endpointSliceLister is able to list/get endpoint slices and is populated by the
// shared informer passed to NewController
endpointSliceLister discoverylisters.EndpointSliceLister
// endpointSlicesSynced returns true if the endpoint slice shared informer has been synced at least once.
// Added as a member to the struct to allow injection for testing.
endpointSlicesSynced cache.InformerSynced
// nodeLister is able to list/get pods and is populated by the
// nodeLister is able to list/get nodes and is populated by the
// shared informer passed to NewController
nodeLister corelisters.NodeLister
// nodesSynced returns true if the node shared informer has been synced at least once.
@ -159,7 +159,7 @@ type Controller struct {
triggerTimeTracker *endpointutil.TriggerTimeTracker
// Services that need to be updated. A channel is inappropriate here,
// because it allowes services with lots of pods to be serviced much
// because it allows services with lots of pods to be serviced much
// more often than services with few pods; it also would cause a
// service that's inserted multiple times to be processed more than
// necessary.
@ -179,8 +179,8 @@ func (c *Controller) Run(workers int, stopCh <-chan struct{}) {
defer utilruntime.HandleCrash()
defer c.queue.ShutDown()
klog.Infof("Starting endpoint controller")
defer klog.Infof("Shutting down endpoint controller")
klog.Infof("Starting endpoint slice controller")
defer klog.Infof("Shutting down endpoint slice controller")
if !cache.WaitForNamedCacheSync("endpoint_slice", stopCh, c.podsSynced, c.servicesSynced) {
return