Fix Issue #61123, call syncer.Update on add event.

This commit is contained in:
Satyadeep Musuvathy 2018-03-13 11:20:50 -07:00
parent b651ed5ea7
commit 4b2de75679

View File

@ -174,14 +174,15 @@ func (c *Controller) onAdd(node *v1.Node) error {
c.lock.Lock()
defer c.lock.Unlock()
if syncer, ok := c.syncers[node.Name]; !ok {
syncer, ok := c.syncers[node.Name]
if !ok {
syncer = c.newSyncer(node.Name)
c.syncers[node.Name] = syncer
go syncer.Loop(nil)
} else {
glog.Warningf("Add for node %q that already exists", node.Name)
syncer.Update(node)
}
syncer.Update(node)
return nil
}