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 2db927e commit 5ffc237
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/controller/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,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 5ffc237

Please sign in to comment.