@@ -50,7 +50,7 @@ you’re looking for.
5050 a particular resource. They also provide convenience functions for accessing shared caches and determining when a
5151 cache is primed.
5252
53- Use the factory methods down in https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/framework/ informers/factory.go
53+ Use the factory methods down in https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/informers/factory.go
5454 to ensure that you are sharing the same instance of the cache as everyone else.
5555
5656 This saves us connections against the API server, duplicate serialization costs server-side, duplicate deserialization
@@ -119,7 +119,7 @@ func (c *Controller) Run(threadiness int, stopCh chan struct{}){
119119 // don't let panics crash the process
120120 defer utilruntime.HandleCrash ()
121121 // make sure the work queue is shutdown which will trigger workers to end
122- defer dsc .queue .ShutDown ()
122+ defer c .queue .ShutDown ()
123123
124124 glog.Infof (" Starting <NAME> controller" )
125125
@@ -142,7 +142,7 @@ func (c *Controller) Run(threadiness int, stopCh chan struct{}){
142142
143143func (c *Controller ) runWorker () {
144144 // hot loop until we're told to stop. processNextWorkItem will automatically wait until there's work
145- // available, so we don't don't worry about secondary waits
145+ // available, so we don't worry about secondary waits
146146 for c.processNextWorkItem () {
147147 }
148148}
@@ -157,7 +157,7 @@ func (c *Controller) processNextWorkItem() bool {
157157 // you always have to indicate to the queue that you've completed a piece of work
158158 defer c.queue .Done (key)
159159
160- // do your work on the key. This method will contains your "do stuff" logic"
160+ // do your work on the key. This method will contains your "do stuff" logic
161161 err := c.syncHandler (key.(string ))
162162 if err == nil {
163163 // if you had no error, tell the queue to stop tracking history for your key. This will
@@ -171,7 +171,7 @@ func (c *Controller) processNextWorkItem() bool {
171171 utilruntime.HandleError (fmt.Errorf (" %v failed with : %v " , key, err))
172172 // since we failed, we should requeue the item to work on later. This method will add a backoff
173173 // to avoid hotlooping on particular items (they're probably still not going to work right away)
174- // and overall controller protection (everything I've done is broken, this controller needs to
174+ // and overall controller protection (everything I've done is broken, this controller needs to
175175 // calm down or it can starve other useful work) cases.
176176 c.queue .AddRateLimited (key)
177177
0 commit comments