mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
fix bug in daemonset
This commit is contained in:
parent
f4cb23975b
commit
d601bfa1bb
@ -448,13 +448,18 @@ func (dsc *DaemonSetsController) updateDaemonSetStatus(ds *experimental.DaemonSe
|
||||
shouldRun := nodeSelector.Matches(labels.Set(node.Labels))
|
||||
numDaemonPods := len(nodeToDaemonPods[node.Name])
|
||||
|
||||
if numDaemonPods > 0 {
|
||||
// TODO(mikedanese): this does not count nodes that should be running
|
||||
// exactly one daemon pod but are running more than one daemon pods.
|
||||
|
||||
if shouldRun && numDaemonPods == 1 {
|
||||
currentNumberScheduled++
|
||||
}
|
||||
|
||||
if shouldRun {
|
||||
desiredNumberScheduled++
|
||||
} else if numDaemonPods >= 0 {
|
||||
}
|
||||
|
||||
if !shouldRun && numDaemonPods > 0 {
|
||||
numberMisscheduled++
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user