mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-22 18:16:52 +00:00
Merge pull request #5806 from ddysher/condition-rename
Rename ConditionFull->ConditionTrue, ConditionNone->ConditionFalse
This commit is contained in:
commit
30c3583900
@ -52,15 +52,15 @@ sane state but not allowed to accept new pods:
|
|||||||
"conditions": [
|
"conditions": [
|
||||||
{
|
{
|
||||||
"kind": "Reachable",
|
"kind": "Reachable",
|
||||||
"status": "Full",
|
"status": "True",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Ready",
|
"kind": "Ready",
|
||||||
"status": "Full",
|
"status": "True",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": "Schedulable",
|
"kind": "Schedulable",
|
||||||
"status": "None",
|
"status": "False",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
@ -449,13 +449,13 @@ type Lifecycle struct {
|
|||||||
|
|
||||||
type ConditionStatus string
|
type ConditionStatus string
|
||||||
|
|
||||||
// These are valid condition statuses. "ConditionFull" means a resource is in the condition;
|
// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
|
||||||
// "ConditionNone" means a resource is not in the condition; "ConditionUnknown" means kubernetes
|
// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
|
||||||
// can't decide if a resource is in the condition or not. In the future, we could add other
|
// can't decide if a resource is in the condition or not. In the future, we could add other
|
||||||
// intermediate conditions, e.g. ConditionDegraded.
|
// intermediate conditions, e.g. ConditionDegraded.
|
||||||
const (
|
const (
|
||||||
ConditionFull ConditionStatus = "Full"
|
ConditionTrue ConditionStatus = "True"
|
||||||
ConditionNone ConditionStatus = "None"
|
ConditionFalse ConditionStatus = "False"
|
||||||
ConditionUnknown ConditionStatus = "Unknown"
|
ConditionUnknown ConditionStatus = "Unknown"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1291,7 +1291,6 @@ func init() {
|
|||||||
*out = NodeConditionKind(*in)
|
*out = NodeConditionKind(*in)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
func(in *NodeConditionKind, out *newer.NodeConditionType, s conversion.Scope) error {
|
func(in *NodeConditionKind, out *newer.NodeConditionType, s conversion.Scope) error {
|
||||||
@ -1308,7 +1307,35 @@ func init() {
|
|||||||
*out = newer.NodeConditionType(*in)
|
*out = newer.NodeConditionType(*in)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
|
||||||
|
func(in *newer.ConditionStatus, out *ConditionStatus, s conversion.Scope) error {
|
||||||
|
switch *in {
|
||||||
|
case newer.ConditionTrue:
|
||||||
|
*out = ConditionFull
|
||||||
|
break
|
||||||
|
case newer.ConditionFalse:
|
||||||
|
*out = ConditionNone
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
*out = ConditionStatus(*in)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
func(in *ConditionStatus, out *newer.ConditionStatus, s conversion.Scope) error {
|
||||||
|
switch *in {
|
||||||
|
case ConditionFull:
|
||||||
|
*out = newer.ConditionTrue
|
||||||
|
break
|
||||||
|
case ConditionNone:
|
||||||
|
*out = newer.ConditionFalse
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
*out = newer.ConditionStatus(*in)
|
||||||
|
break
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1359,6 +1386,7 @@ func init() {
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
|
||||||
func(in *Binding, out *newer.Binding, s conversion.Scope) error {
|
func(in *Binding, out *newer.Binding, s conversion.Scope) error {
|
||||||
if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil {
|
if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -1219,7 +1219,6 @@ func init() {
|
|||||||
*out = NodeConditionKind(*in)
|
*out = NodeConditionKind(*in)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
func(in *NodeConditionKind, out *newer.NodeConditionType, s conversion.Scope) error {
|
func(in *NodeConditionKind, out *newer.NodeConditionType, s conversion.Scope) error {
|
||||||
@ -1236,7 +1235,35 @@ func init() {
|
|||||||
*out = newer.NodeConditionType(*in)
|
*out = newer.NodeConditionType(*in)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
|
||||||
|
func(in *newer.ConditionStatus, out *ConditionStatus, s conversion.Scope) error {
|
||||||
|
switch *in {
|
||||||
|
case newer.ConditionTrue:
|
||||||
|
*out = ConditionFull
|
||||||
|
break
|
||||||
|
case newer.ConditionFalse:
|
||||||
|
*out = ConditionNone
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
*out = ConditionStatus(*in)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
func(in *ConditionStatus, out *newer.ConditionStatus, s conversion.Scope) error {
|
||||||
|
switch *in {
|
||||||
|
case ConditionFull:
|
||||||
|
*out = newer.ConditionTrue
|
||||||
|
break
|
||||||
|
case ConditionNone:
|
||||||
|
*out = newer.ConditionFalse
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
*out = newer.ConditionStatus(*in)
|
||||||
|
break
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1270,7 +1297,6 @@ func init() {
|
|||||||
*out = PodConditionKind(*in)
|
*out = PodConditionKind(*in)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
func(in *PodConditionKind, out *newer.PodConditionType, s conversion.Scope) error {
|
func(in *PodConditionKind, out *newer.PodConditionType, s conversion.Scope) error {
|
||||||
@ -1284,9 +1310,9 @@ func init() {
|
|||||||
*out = newer.PodConditionType(*in)
|
*out = newer.PodConditionType(*in)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
|
|
||||||
func(in *Binding, out *newer.Binding, s conversion.Scope) error {
|
func(in *Binding, out *newer.Binding, s conversion.Scope) error {
|
||||||
if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil {
|
if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -463,13 +463,13 @@ type Lifecycle struct {
|
|||||||
|
|
||||||
type ConditionStatus string
|
type ConditionStatus string
|
||||||
|
|
||||||
// These are valid condition statuses. "ConditionFull" means a resource is in the condition;
|
// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
|
||||||
// "ConditionNone" means a resource is not in the condition; "ConditionUnknown" means kubernetes
|
// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
|
||||||
// can't decide if a resource is in the condition or not. In the future, we could add other
|
// can't decide if a resource is in the condition or not. In the future, we could add other
|
||||||
// intermediate conditions, e.g. ConditionDegraded.
|
// intermediate conditions, e.g. ConditionDegraded.
|
||||||
const (
|
const (
|
||||||
ConditionFull ConditionStatus = "Full"
|
ConditionTrue ConditionStatus = "True"
|
||||||
ConditionNone ConditionStatus = "None"
|
ConditionFalse ConditionStatus = "False"
|
||||||
ConditionUnknown ConditionStatus = "Unknown"
|
ConditionUnknown ConditionStatus = "Unknown"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -301,7 +301,7 @@ func (nc *NodeController) DoCheck(node *api.Node) []api.NodeCondition {
|
|||||||
oldReadyCondition := nc.getCondition(node, api.NodeReady)
|
oldReadyCondition := nc.getCondition(node, api.NodeReady)
|
||||||
newReadyCondition := nc.checkNodeReady(node)
|
newReadyCondition := nc.checkNodeReady(node)
|
||||||
nc.updateLastTransitionTime(oldReadyCondition, newReadyCondition)
|
nc.updateLastTransitionTime(oldReadyCondition, newReadyCondition)
|
||||||
if newReadyCondition.Status != api.ConditionFull {
|
if newReadyCondition.Status != api.ConditionTrue {
|
||||||
// Node is not ready for this probe, we need to check if pods need to be deleted.
|
// Node is not ready for this probe, we need to check if pods need to be deleted.
|
||||||
if newReadyCondition.LastProbeTime.After(newReadyCondition.LastTransitionTime.Add(nc.podEvictionTimeout)) {
|
if newReadyCondition.LastProbeTime.After(newReadyCondition.LastTransitionTime.Add(nc.podEvictionTimeout)) {
|
||||||
// As long as the node fails, we call delete pods to delete all pods. Node controller sync
|
// As long as the node fails, we call delete pods to delete all pods. Node controller sync
|
||||||
@ -338,14 +338,14 @@ func (nc *NodeController) checkNodeSchedulable(node *api.Node) *api.NodeConditio
|
|||||||
if node.Spec.Unschedulable {
|
if node.Spec.Unschedulable {
|
||||||
return &api.NodeCondition{
|
return &api.NodeCondition{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
Reason: "User marked unschedulable during node create/update",
|
Reason: "User marked unschedulable during node create/update",
|
||||||
LastProbeTime: nc.now(),
|
LastProbeTime: nc.now(),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return &api.NodeCondition{
|
return &api.NodeCondition{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node is schedulable by default",
|
Reason: "Node is schedulable by default",
|
||||||
LastProbeTime: nc.now(),
|
LastProbeTime: nc.now(),
|
||||||
}
|
}
|
||||||
@ -366,14 +366,14 @@ func (nc *NodeController) checkNodeReady(node *api.Node) *api.NodeCondition {
|
|||||||
case status == probe.Failure:
|
case status == probe.Failure:
|
||||||
return &api.NodeCondition{
|
return &api.NodeCondition{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
Reason: fmt.Sprintf("Node health check failed: kubelet /healthz endpoint returns not ok"),
|
Reason: fmt.Sprintf("Node health check failed: kubelet /healthz endpoint returns not ok"),
|
||||||
LastProbeTime: nc.now(),
|
LastProbeTime: nc.now(),
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return &api.NodeCondition{
|
return &api.NodeCondition{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: fmt.Sprintf("Node health check succeeded: kubelet /healthz endpoint returns ok"),
|
Reason: fmt.Sprintf("Node health check succeeded: kubelet /healthz endpoint returns ok"),
|
||||||
LastProbeTime: nc.now(),
|
LastProbeTime: nc.now(),
|
||||||
}
|
}
|
||||||
@ -481,7 +481,7 @@ func (nc *NodeController) MonitorNodeStatus() error {
|
|||||||
|
|
||||||
if readyCondition != nil {
|
if readyCondition != nil {
|
||||||
// Check eviction timeout.
|
// Check eviction timeout.
|
||||||
if lastReadyCondition.Status == api.ConditionNone &&
|
if lastReadyCondition.Status == api.ConditionFalse &&
|
||||||
nc.now().After(lastReadyCondition.LastTransitionTime.Add(nc.podEvictionTimeout)) {
|
nc.now().After(lastReadyCondition.LastTransitionTime.Add(nc.podEvictionTimeout)) {
|
||||||
// Node stays in not ready for at least 'podEvictionTimeout' - evict all pods on the unhealthy node.
|
// Node stays in not ready for at least 'podEvictionTimeout' - evict all pods on the unhealthy node.
|
||||||
nc.deletePods(node.Name)
|
nc.deletePods(node.Name)
|
||||||
|
@ -580,14 +580,14 @@ func TestNodeConditionsCheck(t *testing.T) {
|
|||||||
expectedConditions: []api.NodeCondition{
|
expectedConditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node is schedulable by default",
|
Reason: "Node is schedulable by default",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
@ -605,14 +605,14 @@ func TestNodeConditionsCheck(t *testing.T) {
|
|||||||
expectedConditions: []api.NodeCondition{
|
expectedConditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
Reason: "Node health check failed: kubelet /healthz endpoint returns not ok",
|
Reason: "Node health check failed: kubelet /healthz endpoint returns not ok",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node is schedulable by default",
|
Reason: "Node is schedulable by default",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
@ -637,7 +637,7 @@ func TestNodeConditionsCheck(t *testing.T) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
Reason: "User marked unschedulable during node create/update",
|
Reason: "User marked unschedulable during node create/update",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
@ -719,14 +719,14 @@ func TestSyncProbedNodeStatus(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node is schedulable by default",
|
Reason: "Node is schedulable by default",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
@ -743,14 +743,14 @@ func TestSyncProbedNodeStatus(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node is schedulable by default",
|
Reason: "Node is schedulable by default",
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
@ -810,13 +810,13 @@ func TestSyncProbedNodeStatusTransitionTime(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
||||||
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node is schedulable by default",
|
Reason: "Node is schedulable by default",
|
||||||
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
},
|
},
|
||||||
@ -845,13 +845,13 @@ func TestSyncProbedNodeStatusTransitionTime(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
||||||
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Type: api.NodeSchedulable,
|
Type: api.NodeSchedulable,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node is schedulable by default",
|
Reason: "Node is schedulable by default",
|
||||||
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
},
|
},
|
||||||
@ -906,7 +906,7 @@ func TestSyncProbedNodeStatusEvictPods(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
||||||
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
},
|
},
|
||||||
@ -936,7 +936,7 @@ func TestSyncProbedNodeStatusEvictPods(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
Reason: "Node health check succeeded: kubelet /healthz endpoint returns ok",
|
||||||
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
},
|
},
|
||||||
@ -965,7 +965,7 @@ func TestSyncProbedNodeStatusEvictPods(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
Reason: "Node health check failed: kubelet /healthz endpoint returns not ok",
|
Reason: "Node health check failed: kubelet /healthz endpoint returns not ok",
|
||||||
// Here, last transition time is Now(). In node controller, the new condition's probe time is
|
// Here, last transition time is Now(). In node controller, the new condition's probe time is
|
||||||
// also Now(). The two calls to Now() yields differnt time due to test execution, but the
|
// also Now(). The two calls to Now() yields differnt time due to test execution, but the
|
||||||
@ -997,7 +997,7 @@ func TestSyncProbedNodeStatusEvictPods(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
Reason: "Node health check failed: kubelet /healthz endpoint returns not ok",
|
Reason: "Node health check failed: kubelet /healthz endpoint returns not ok",
|
||||||
// Here, last transition time is in the past, and in node controller, the
|
// Here, last transition time is in the past, and in node controller, the
|
||||||
// new condition's probe time is Now(). The time difference is larger than
|
// new condition's probe time is Now(). The time difference is larger than
|
||||||
@ -1075,7 +1075,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
// Node status has just been updated, and transited to NotReady for 10min.
|
// Node status has just been updated, and transited to NotReady for 10min.
|
||||||
LastProbeTime: util.Date(2015, 1, 1, 11, 59, 0, 0, time.UTC),
|
LastProbeTime: util.Date(2015, 1, 1, 11, 59, 0, 0, time.UTC),
|
||||||
LastTransitionTime: util.Date(2015, 1, 1, 11, 50, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2015, 1, 1, 11, 50, 0, 0, time.UTC),
|
||||||
@ -1104,7 +1104,7 @@ func TestMonitorNodeStatusEvictPods(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
// Node status has just been updated, and transited to NotReady for 1hr.
|
// Node status has just been updated, and transited to NotReady for 1hr.
|
||||||
LastProbeTime: util.Date(2015, 1, 1, 11, 59, 0, 0, time.UTC),
|
LastProbeTime: util.Date(2015, 1, 1, 11, 59, 0, 0, time.UTC),
|
||||||
LastTransitionTime: util.Date(2015, 1, 1, 11, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2015, 1, 1, 11, 0, 0, 0, time.UTC),
|
||||||
@ -1275,7 +1275,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
// Node status hasn't been updated for 1hr.
|
// Node status hasn't been updated for 1hr.
|
||||||
LastProbeTime: util.Date(2015, 1, 1, 11, 0, 0, 0, time.UTC),
|
LastProbeTime: util.Date(2015, 1, 1, 11, 0, 0, 0, time.UTC),
|
||||||
LastTransitionTime: util.Date(2015, 1, 1, 11, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2015, 1, 1, 11, 0, 0, 0, time.UTC),
|
||||||
@ -1323,7 +1323,7 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
// Node status has just been updated.
|
// Node status has just been updated.
|
||||||
LastProbeTime: fakeNow,
|
LastProbeTime: fakeNow,
|
||||||
LastTransitionTime: fakeNow,
|
LastTransitionTime: fakeNow,
|
||||||
|
@ -440,7 +440,7 @@ func printNode(node *api.Node, w io.Writer) error {
|
|||||||
var status []string
|
var status []string
|
||||||
for _, validCondition := range NodeAllConditions {
|
for _, validCondition := range NodeAllConditions {
|
||||||
if condition, ok := conditionMap[validCondition]; ok {
|
if condition, ok := conditionMap[validCondition]; ok {
|
||||||
if condition.Status == api.ConditionFull {
|
if condition.Status == api.ConditionTrue {
|
||||||
status = append(status, string(condition.Type))
|
status = append(status, string(condition.Type))
|
||||||
} else {
|
} else {
|
||||||
status = append(status, "Not"+string(condition.Type))
|
status = append(status, "Not"+string(condition.Type))
|
||||||
|
@ -524,7 +524,7 @@ func TestPrintMinionStatus(t *testing.T) {
|
|||||||
{
|
{
|
||||||
minion: api.Node{
|
minion: api.Node{
|
||||||
ObjectMeta: api.ObjectMeta{Name: "foo1"},
|
ObjectMeta: api.ObjectMeta{Name: "foo1"},
|
||||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionFull}}},
|
Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionTrue}}},
|
||||||
},
|
},
|
||||||
status: "Ready",
|
status: "Ready",
|
||||||
},
|
},
|
||||||
@ -532,8 +532,8 @@ func TestPrintMinionStatus(t *testing.T) {
|
|||||||
minion: api.Node{
|
minion: api.Node{
|
||||||
ObjectMeta: api.ObjectMeta{Name: "foo2"},
|
ObjectMeta: api.ObjectMeta{Name: "foo2"},
|
||||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull}}},
|
{Type: api.NodeReachable, Status: api.ConditionTrue}}},
|
||||||
},
|
},
|
||||||
status: "Ready,Reachable",
|
status: "Ready,Reachable",
|
||||||
},
|
},
|
||||||
@ -541,22 +541,22 @@ func TestPrintMinionStatus(t *testing.T) {
|
|||||||
minion: api.Node{
|
minion: api.Node{
|
||||||
ObjectMeta: api.ObjectMeta{Name: "foo3"},
|
ObjectMeta: api.ObjectMeta{Name: "foo3"},
|
||||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull}}},
|
{Type: api.NodeReady, Status: api.ConditionTrue}}},
|
||||||
},
|
},
|
||||||
status: "Ready",
|
status: "Ready",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minion: api.Node{
|
minion: api.Node{
|
||||||
ObjectMeta: api.ObjectMeta{Name: "foo4"},
|
ObjectMeta: api.ObjectMeta{Name: "foo4"},
|
||||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionNone}}},
|
Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: api.NodeReady, Status: api.ConditionFalse}}},
|
||||||
},
|
},
|
||||||
status: "NotReady",
|
status: "NotReady",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
minion: api.Node{
|
minion: api.Node{
|
||||||
ObjectMeta: api.ObjectMeta{Name: "foo5"},
|
ObjectMeta: api.ObjectMeta{Name: "foo5"},
|
||||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: "InvalidValue", Status: api.ConditionFull}}},
|
Status: api.NodeStatus{Conditions: []api.NodeCondition{{Type: "InvalidValue", Status: api.ConditionTrue}}},
|
||||||
},
|
},
|
||||||
status: "Unknown",
|
status: "Unknown",
|
||||||
},
|
},
|
||||||
@ -571,9 +571,9 @@ func TestPrintMinionStatus(t *testing.T) {
|
|||||||
minion: api.Node{
|
minion: api.Node{
|
||||||
ObjectMeta: api.ObjectMeta{Name: "foo7"},
|
ObjectMeta: api.ObjectMeta{Name: "foo7"},
|
||||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull}}},
|
{Type: api.NodeReachable, Status: api.ConditionTrue}}},
|
||||||
},
|
},
|
||||||
status: "Schedulable,Ready,Reachable",
|
status: "Schedulable,Ready,Reachable",
|
||||||
},
|
},
|
||||||
@ -581,9 +581,9 @@ func TestPrintMinionStatus(t *testing.T) {
|
|||||||
minion: api.Node{
|
minion: api.Node{
|
||||||
ObjectMeta: api.ObjectMeta{Name: "foo8"},
|
ObjectMeta: api.ObjectMeta{Name: "foo8"},
|
||||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionNone},
|
{Type: api.NodeSchedulable, Status: api.ConditionFalse},
|
||||||
{Type: api.NodeReady, Status: api.ConditionNone},
|
{Type: api.NodeReady, Status: api.ConditionFalse},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull}}},
|
{Type: api.NodeReachable, Status: api.ConditionTrue}}},
|
||||||
},
|
},
|
||||||
status: "NotSchedulable,NotReady,Reachable",
|
status: "NotSchedulable,NotReady,Reachable",
|
||||||
},
|
},
|
||||||
|
@ -1852,7 +1852,7 @@ func (kl *Kubelet) tryUpdateNodeStatus() error {
|
|||||||
currentTime := util.Now()
|
currentTime := util.Now()
|
||||||
newCondition := api.NodeCondition{
|
newCondition := api.NodeCondition{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: fmt.Sprintf("kubelet is posting ready status"),
|
Reason: fmt.Sprintf("kubelet is posting ready status"),
|
||||||
LastProbeTime: currentTime,
|
LastProbeTime: currentTime,
|
||||||
}
|
}
|
||||||
@ -1939,11 +1939,11 @@ func getPhase(spec *api.PodSpec, info api.PodInfo) api.PodPhase {
|
|||||||
func getPodReadyCondition(spec *api.PodSpec, info api.PodInfo) []api.PodCondition {
|
func getPodReadyCondition(spec *api.PodSpec, info api.PodInfo) []api.PodCondition {
|
||||||
ready := []api.PodCondition{{
|
ready := []api.PodCondition{{
|
||||||
Type: api.PodReady,
|
Type: api.PodReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
}}
|
}}
|
||||||
unready := []api.PodCondition{{
|
unready := []api.PodCondition{{
|
||||||
Type: api.PodReady,
|
Type: api.PodReady,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
}}
|
}}
|
||||||
if info == nil {
|
if info == nil {
|
||||||
return unready
|
return unready
|
||||||
|
@ -2465,11 +2465,11 @@ func TestPodPhaseWithRestartOnFailure(t *testing.T) {
|
|||||||
func TestGetPodReadyCondition(t *testing.T) {
|
func TestGetPodReadyCondition(t *testing.T) {
|
||||||
ready := []api.PodCondition{{
|
ready := []api.PodCondition{{
|
||||||
Type: api.PodReady,
|
Type: api.PodReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
}}
|
}}
|
||||||
unready := []api.PodCondition{{
|
unready := []api.PodCondition{{
|
||||||
Type: api.PodReady,
|
Type: api.PodReady,
|
||||||
Status: api.ConditionNone,
|
Status: api.ConditionFalse,
|
||||||
}}
|
}}
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
spec *api.PodSpec
|
spec *api.PodSpec
|
||||||
@ -3103,7 +3103,7 @@ func TestUpdateNewNodeStatus(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: fmt.Sprintf("kubelet is posting ready status"),
|
Reason: fmt.Sprintf("kubelet is posting ready status"),
|
||||||
LastProbeTime: util.Time{},
|
LastProbeTime: util.Time{},
|
||||||
LastTransitionTime: util.Time{},
|
LastTransitionTime: util.Time{},
|
||||||
@ -3157,7 +3157,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: fmt.Sprintf("kubelet is posting ready status"),
|
Reason: fmt.Sprintf("kubelet is posting ready status"),
|
||||||
LastProbeTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
LastProbeTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
LastTransitionTime: util.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC),
|
||||||
@ -3180,7 +3180,7 @@ func TestUpdateExistingNodeStatus(t *testing.T) {
|
|||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{
|
{
|
||||||
Type: api.NodeReady,
|
Type: api.NodeReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
Reason: fmt.Sprintf("kubelet is posting ready status"),
|
Reason: fmt.Sprintf("kubelet is posting ready status"),
|
||||||
LastProbeTime: util.Time{}, // placeholder
|
LastProbeTime: util.Time{}, // placeholder
|
||||||
LastTransitionTime: util.Time{}, // placeholder
|
LastTransitionTime: util.Time{}, // placeholder
|
||||||
|
@ -198,7 +198,7 @@ func (p *PodCache) computePodStatus(pod *api.Pod) (api.PodStatus, error) {
|
|||||||
|
|
||||||
// Assigned to an unhealthy node.
|
// Assigned to an unhealthy node.
|
||||||
for _, condition := range nodeStatus.Conditions {
|
for _, condition := range nodeStatus.Conditions {
|
||||||
if (condition.Type == api.NodeReady || condition.Type == api.NodeReachable) && condition.Status == api.ConditionNone {
|
if (condition.Type == api.NodeReady || condition.Type == api.NodeReachable) && condition.Status == api.ConditionFalse {
|
||||||
glog.V(5).Infof("node status: %v, setting pod %q status to unknown", condition, pod.Name)
|
glog.V(5).Infof("node status: %v, setting pod %q status to unknown", condition, pod.Name)
|
||||||
newStatus.Phase = api.PodUnknown
|
newStatus.Phase = api.PodUnknown
|
||||||
newStatus.Conditions = append(newStatus.Conditions, pod.Status.Conditions...)
|
newStatus.Conditions = append(newStatus.Conditions, pod.Status.Conditions...)
|
||||||
|
@ -228,7 +228,7 @@ func makeHealthyNode(name string, ip string) *api.Node {
|
|||||||
{Type: api.NodeLegacyHostIP, Address: ip},
|
{Type: api.NodeLegacyHostIP, Address: ip},
|
||||||
},
|
},
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -238,7 +238,7 @@ func makeUnhealthyNode(name string) *api.Node {
|
|||||||
return &api.Node{
|
return &api.Node{
|
||||||
ObjectMeta: api.ObjectMeta{Name: name},
|
ObjectMeta: api.ObjectMeta{Name: name},
|
||||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionNone},
|
{Type: api.NodeReady, Status: api.ConditionFalse},
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ func (e *EndpointController) SyncServiceEndpoints() error {
|
|||||||
|
|
||||||
inService := false
|
inService := false
|
||||||
for _, c := range pod.Status.Conditions {
|
for _, c := range pod.Status.Conditions {
|
||||||
if c.Type == api.PodReady && c.Status == api.ConditionFull {
|
if c.Type == api.PodReady && c.Status == api.ConditionTrue {
|
||||||
inService = true
|
inService = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ func newPodList(count int) *api.PodList {
|
|||||||
Conditions: []api.PodCondition{
|
Conditions: []api.PodCondition{
|
||||||
{
|
{
|
||||||
Type: api.PodReady,
|
Type: api.PodReady,
|
||||||
Status: api.ConditionFull,
|
Status: api.ConditionTrue,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -216,16 +216,16 @@ func (factory *ConfigFactory) pollMinions() (cache.Enumerator, error) {
|
|||||||
conditionMap[cond.Type] = &cond
|
conditionMap[cond.Type] = &cond
|
||||||
}
|
}
|
||||||
if condition, ok := conditionMap[api.NodeSchedulable]; ok {
|
if condition, ok := conditionMap[api.NodeSchedulable]; ok {
|
||||||
if condition.Status != api.ConditionFull {
|
if condition.Status != api.ConditionTrue {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if condition, ok := conditionMap[api.NodeReady]; ok {
|
if condition, ok := conditionMap[api.NodeReady]; ok {
|
||||||
if condition.Status == api.ConditionFull {
|
if condition.Status == api.ConditionTrue {
|
||||||
nodes.Items = append(nodes.Items, node)
|
nodes.Items = append(nodes.Items, node)
|
||||||
}
|
}
|
||||||
} else if condition, ok := conditionMap[api.NodeReachable]; ok {
|
} else if condition, ok := conditionMap[api.NodeReachable]; ok {
|
||||||
if condition.Status == api.ConditionFull {
|
if condition.Status == api.ConditionTrue {
|
||||||
nodes.Items = append(nodes.Items, node)
|
nodes.Items = append(nodes.Items, node)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -143,7 +143,7 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -151,7 +151,7 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "bar"},
|
ObjectMeta: api.ObjectMeta{Name: "bar"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -159,7 +159,7 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "fiz"},
|
ObjectMeta: api.ObjectMeta{Name: "fiz"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -167,8 +167,8 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "biz"},
|
ObjectMeta: api.ObjectMeta{Name: "biz"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -176,8 +176,8 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "baz"},
|
ObjectMeta: api.ObjectMeta{Name: "baz"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -185,9 +185,9 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "fuz"},
|
ObjectMeta: api.ObjectMeta{Name: "fuz"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -195,9 +195,9 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "buz"},
|
ObjectMeta: api.ObjectMeta{Name: "buz"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionNone},
|
{Type: api.NodeSchedulable, Status: api.ConditionFalse},
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -205,9 +205,9 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "foobar"},
|
ObjectMeta: api.ObjectMeta{Name: "foobar"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReady, Status: api.ConditionNone},
|
{Type: api.NodeReady, Status: api.ConditionFalse},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -215,8 +215,8 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "fizbiz"},
|
ObjectMeta: api.ObjectMeta{Name: "fizbiz"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionNone},
|
{Type: api.NodeReachable, Status: api.ConditionFalse},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -229,7 +229,7 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -237,7 +237,7 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "bar"},
|
ObjectMeta: api.ObjectMeta{Name: "bar"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionNone},
|
{Type: api.NodeReady, Status: api.ConditionFalse},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -250,7 +250,7 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -258,7 +258,7 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "bar"},
|
ObjectMeta: api.ObjectMeta{Name: "bar"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeSchedulable, Status: api.ConditionNone},
|
{Type: api.NodeSchedulable, Status: api.ConditionFalse},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -271,8 +271,8 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||||
{Type: api.NodeReachable, Status: api.ConditionNone}},
|
{Type: api.NodeReachable, Status: api.ConditionFalse}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -284,8 +284,8 @@ func TestPollMinions(t *testing.T) {
|
|||||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||||
Status: api.NodeStatus{
|
Status: api.NodeStatus{
|
||||||
Conditions: []api.NodeCondition{
|
Conditions: []api.NodeCondition{
|
||||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||||
{Type: "invalidValue", Status: api.ConditionNone}},
|
{Type: "invalidValue", Status: api.ConditionFalse}},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user