mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 19:21:37 +00:00
Rename ConditionFull->ConditionTrue, ConditionNone->ConditionFalse
This commit is contained in:
@@ -440,7 +440,7 @@ func printNode(node *api.Node, w io.Writer) error {
|
||||
var status []string
|
||||
for _, validCondition := range NodeAllConditions {
|
||||
if condition, ok := conditionMap[validCondition]; ok {
|
||||
if condition.Status == api.ConditionFull {
|
||||
if condition.Status == api.ConditionTrue {
|
||||
status = append(status, string(condition.Type))
|
||||
} else {
|
||||
status = append(status, "Not"+string(condition.Type))
|
||||
|
@@ -524,7 +524,7 @@ func TestPrintMinionStatus(t *testing.T) {
|
||||
{
|
||||
minion: api.Node{
|
||||
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",
|
||||
},
|
||||
@@ -532,8 +532,8 @@ func TestPrintMinionStatus(t *testing.T) {
|
||||
minion: api.Node{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo2"},
|
||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
||||
{Type: api.NodeReachable, Status: api.ConditionFull}}},
|
||||
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReachable, Status: api.ConditionTrue}}},
|
||||
},
|
||||
status: "Ready,Reachable",
|
||||
},
|
||||
@@ -541,22 +541,22 @@ func TestPrintMinionStatus(t *testing.T) {
|
||||
minion: api.Node{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo3"},
|
||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
||||
{Type: api.NodeReady, Status: api.ConditionFull}}},
|
||||
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReady, Status: api.ConditionTrue}}},
|
||||
},
|
||||
status: "Ready",
|
||||
},
|
||||
{
|
||||
minion: api.Node{
|
||||
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",
|
||||
},
|
||||
{
|
||||
minion: api.Node{
|
||||
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",
|
||||
},
|
||||
@@ -571,9 +571,9 @@ func TestPrintMinionStatus(t *testing.T) {
|
||||
minion: api.Node{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo7"},
|
||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
||||
{Type: api.NodeReachable, Status: api.ConditionFull}}},
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReachable, Status: api.ConditionTrue}}},
|
||||
},
|
||||
status: "Schedulable,Ready,Reachable",
|
||||
},
|
||||
@@ -581,9 +581,9 @@ func TestPrintMinionStatus(t *testing.T) {
|
||||
minion: api.Node{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo8"},
|
||||
Status: api.NodeStatus{Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionNone},
|
||||
{Type: api.NodeReady, Status: api.ConditionNone},
|
||||
{Type: api.NodeReachable, Status: api.ConditionFull}}},
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionFalse},
|
||||
{Type: api.NodeReady, Status: api.ConditionFalse},
|
||||
{Type: api.NodeReachable, Status: api.ConditionTrue}}},
|
||||
},
|
||||
status: "NotSchedulable,NotReady,Reachable",
|
||||
},
|
||||
|
Reference in New Issue
Block a user