mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
include name match in mischeduled check in daemonset controller
This commit is contained in:
parent
57a08b5563
commit
5a441d4ad1
@ -445,7 +445,10 @@ func (dsc *DaemonSetsController) updateDaemonSetStatus(ds *experimental.DaemonSe
|
||||
var desiredNumberScheduled, currentNumberScheduled, numberMisscheduled int
|
||||
for _, node := range nodeList.Items {
|
||||
nodeSelector := labels.Set(ds.Spec.Template.Spec.NodeSelector).AsSelector()
|
||||
shouldRun := nodeSelector.Matches(labels.Set(node.Labels))
|
||||
nameMatch := ds.Spec.Template.Name == "" || ds.Spec.Template.Name == node.Name
|
||||
labelMatch := nodeSelector.Matches(labels.Set(node.Labels))
|
||||
shouldRun := nameMatch && labelMatch
|
||||
|
||||
numDaemonPods := len(nodeToDaemonPods[node.Name])
|
||||
|
||||
if numDaemonPods > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user