Add NumberReady to DaemonSet status

Fixes #25605
This commit is contained in:
Łukasz Oleś
2016-10-05 09:16:41 +02:00
parent bd3c11df8a
commit 5d2e215652
8 changed files with 74 additions and 7 deletions

View File

@@ -385,6 +385,10 @@ type DaemonSetStatus struct {
// DesiredNumberScheduled is the total number of nodes that should be running the daemon
// pod (including nodes correctly running the daemon pod).
DesiredNumberScheduled int32 `json:"desiredNumberScheduled"`
// NumberReady is the number of nodes that should be running the daemon pod and have one
// or more of the daemon pod running and ready.
NumberReady int32 `json:"numberReady"`
}
// +genclient=true

View File

@@ -459,6 +459,10 @@ type DaemonSetStatus struct {
// pod (including nodes correctly running the daemon pod).
// More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md
DesiredNumberScheduled int32 `json:"desiredNumberScheduled" protobuf:"varint,3,opt,name=desiredNumberScheduled"`
// NumberReady is the number of nodes that should be running the daemon pod and have one
// or more of the daemon pod running and ready.
NumberReady int32 `json:"numberReady" protobuf:"varint,4,opt,name=numberReady"`
}
// +genclient=true

View File

@@ -44,6 +44,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) {
CurrentNumberScheduled: 1,
NumberMisscheduled: 2,
DesiredNumberScheduled: 3,
NumberReady: 1,
},
},
update: extensions.DaemonSet{
@@ -52,6 +53,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) {
CurrentNumberScheduled: 1,
NumberMisscheduled: 1,
DesiredNumberScheduled: 3,
NumberReady: 1,
},
},
},
@@ -76,6 +78,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) {
CurrentNumberScheduled: 1,
NumberMisscheduled: 2,
DesiredNumberScheduled: 3,
NumberReady: 1,
},
},
update: extensions.DaemonSet{
@@ -88,6 +91,7 @@ func TestValidateDaemonSetStatusUpdate(t *testing.T) {
CurrentNumberScheduled: -1,
NumberMisscheduled: -1,
DesiredNumberScheduled: -3,
NumberReady: -1,
},
},
},