Skip to content

Commit

Permalink
add node to addNodeQueue if required annations are missing (#2481)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Mar 15, 2023
1 parent 47a7055 commit 1470c10
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/controller/node.go
Expand Up @@ -59,8 +59,13 @@ func (c *Controller) enqueueUpdateNode(oldObj, newObj interface{}) {
utilruntime.HandleError(err)
return
}
klog.V(3).Infof("enqueue update node %s", key)
c.updateNodeQueue.Add(key)
if len(newNode.Annotations) == 0 || newNode.Annotations[util.AllocatedAnnotation] != "true" {
klog.V(3).Infof("enqueue add node %s", key)
c.addNodeQueue.Add(key)
} else {
klog.V(3).Infof("enqueue update node %s", key)
c.updateNodeQueue.Add(key)
}
}
}

Expand Down

0 comments on commit 1470c10

Please sign in to comment.