mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Merge pull request #82865 from tnqn/endpointslice
Fix wrong comments and inaccurate logs in endpointslice_controller
This commit is contained in:
commit
b4489d1709
@ -137,14 +137,14 @@ type Controller struct {
|
|||||||
// Added as a member to the struct to allow injection for testing.
|
// Added as a member to the struct to allow injection for testing.
|
||||||
podsSynced cache.InformerSynced
|
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
|
// shared informer passed to NewController
|
||||||
endpointSliceLister discoverylisters.EndpointSliceLister
|
endpointSliceLister discoverylisters.EndpointSliceLister
|
||||||
// endpointSlicesSynced returns true if the endpoint slice shared informer has been synced at least once.
|
// 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.
|
// Added as a member to the struct to allow injection for testing.
|
||||||
endpointSlicesSynced cache.InformerSynced
|
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
|
// shared informer passed to NewController
|
||||||
nodeLister corelisters.NodeLister
|
nodeLister corelisters.NodeLister
|
||||||
// nodesSynced returns true if the node shared informer has been synced at least once.
|
// nodesSynced returns true if the node shared informer has been synced at least once.
|
||||||
@ -159,7 +159,7 @@ type Controller struct {
|
|||||||
triggerTimeTracker *endpointutil.TriggerTimeTracker
|
triggerTimeTracker *endpointutil.TriggerTimeTracker
|
||||||
|
|
||||||
// Services that need to be updated. A channel is inappropriate here,
|
// 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
|
// more often than services with few pods; it also would cause a
|
||||||
// service that's inserted multiple times to be processed more than
|
// service that's inserted multiple times to be processed more than
|
||||||
// necessary.
|
// necessary.
|
||||||
@ -179,8 +179,8 @@ func (c *Controller) Run(workers int, stopCh <-chan struct{}) {
|
|||||||
defer utilruntime.HandleCrash()
|
defer utilruntime.HandleCrash()
|
||||||
defer c.queue.ShutDown()
|
defer c.queue.ShutDown()
|
||||||
|
|
||||||
klog.Infof("Starting endpoint controller")
|
klog.Infof("Starting endpoint slice controller")
|
||||||
defer klog.Infof("Shutting down endpoint controller")
|
defer klog.Infof("Shutting down endpoint slice controller")
|
||||||
|
|
||||||
if !cache.WaitForNamedCacheSync("endpoint_slice", stopCh, c.podsSynced, c.servicesSynced) {
|
if !cache.WaitForNamedCacheSync("endpoint_slice", stopCh, c.podsSynced, c.servicesSynced) {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user