mirror of https://github.com/k3s-io/k3s
revise meaning of DaemonsSpecStatus.CurrentNumberScheduled
parent
1769c1c34b
commit
e5fe0c0c6e
|
@ -313,7 +313,7 @@ type DaemonSetSpec struct {
|
|||
|
||||
// DaemonSetStatus represents the current status of a daemon set.
|
||||
type DaemonSetStatus struct {
|
||||
// CurrentNumberScheduled is the number of nodes that are running exactly 1
|
||||
// CurrentNumberScheduled is the number of nodes that are running at least 1
|
||||
// daemon pod and are supposed to run the daemon pod.
|
||||
CurrentNumberScheduled int `json:"currentNumberScheduled"`
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ type DaemonSetSpec struct {
|
|||
|
||||
// DaemonSetStatus represents the current status of a daemon set.
|
||||
type DaemonSetStatus struct {
|
||||
// CurrentNumberScheduled is the number of nodes that are running exactly 1
|
||||
// CurrentNumberScheduled is the number of nodes that are running at least 1
|
||||
// daemon pod and are supposed to run the daemon pod.
|
||||
// More info: http://releases.k8s.io/HEAD/docs/admin/daemon.md
|
||||
CurrentNumberScheduled int `json:"currentNumberScheduled"`
|
||||
|
|
|
@ -99,7 +99,7 @@ func (DaemonSetSpec) SwaggerDoc() map[string]string {
|
|||
|
||||
var map_DaemonSetStatus = map[string]string{
|
||||
"": "DaemonSetStatus represents the current status of a daemon set.",
|
||||
"currentNumberScheduled": "CurrentNumberScheduled is the number of nodes that are running exactly 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemon.md",
|
||||
"currentNumberScheduled": "CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemon.md",
|
||||
"numberMisscheduled": "NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemon.md",
|
||||
"desiredNumberScheduled": "DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemon.md",
|
||||
}
|
||||
|
|
|
@ -452,10 +452,7 @@ func (dsc *DaemonSetsController) updateDaemonSetStatus(ds *experimental.DaemonSe
|
|||
|
||||
numDaemonPods := len(nodeToDaemonPods[node.Name])
|
||||
|
||||
// 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 {
|
||||
if shouldRun && numDaemonPods > 0 {
|
||||
currentNumberScheduled++
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue