in pkg/localcontroller/controller.go [180:199]
func (c *Controller) enqueue(obj interface{}) {
var key string
var err error
// Convert the object into a key (in this case
// we are doing it in the format of 'namespace/name')
if key, err = cache.MetaNamespaceKeyFunc(obj); err != nil {
utilruntime.HandleError(err)
return
}
// Should the logic be moved to handleObject?
if _, ok := c.watchedNodes.nodes[key]; ok {
klog.V(1).Infof("Node <%s> is already being watched, skip enqueue the workqueue\n", key)
return
}
c.workqueue.Add(key)
klog.V(1).Infof("Added the Node <%s> to workqueue\n", key)
}