mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 12:11:43 +00:00
Rename ConditionFull->ConditionTrue, ConditionNone->ConditionFalse
This commit is contained in:
@@ -216,16 +216,16 @@ func (factory *ConfigFactory) pollMinions() (cache.Enumerator, error) {
|
||||
conditionMap[cond.Type] = &cond
|
||||
}
|
||||
if condition, ok := conditionMap[api.NodeSchedulable]; ok {
|
||||
if condition.Status != api.ConditionFull {
|
||||
if condition.Status != api.ConditionTrue {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if condition, ok := conditionMap[api.NodeReady]; ok {
|
||||
if condition.Status == api.ConditionFull {
|
||||
if condition.Status == api.ConditionTrue {
|
||||
nodes.Items = append(nodes.Items, node)
|
||||
}
|
||||
} else if condition, ok := conditionMap[api.NodeReachable]; ok {
|
||||
if condition.Status == api.ConditionFull {
|
||||
if condition.Status == api.ConditionTrue {
|
||||
nodes.Items = append(nodes.Items, node)
|
||||
}
|
||||
} else {
|
||||
|
@@ -143,7 +143,7 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||
Status: api.NodeStatus{
|
||||
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"},
|
||||
Status: api.NodeStatus{
|
||||
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"},
|
||||
Status: api.NodeStatus{
|
||||
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"},
|
||||
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},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -176,8 +176,8 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "baz"},
|
||||
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},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -185,9 +185,9 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "fuz"},
|
||||
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},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -195,9 +195,9 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "buz"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionNone},
|
||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionFalse},
|
||||
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -205,9 +205,9 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "foobar"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
||||
{Type: api.NodeReady, Status: api.ConditionNone},
|
||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReady, Status: api.ConditionFalse},
|
||||
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -215,8 +215,8 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "fizbiz"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionFull},
|
||||
{Type: api.NodeReachable, Status: api.ConditionNone},
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReachable, Status: api.ConditionFalse},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -229,7 +229,7 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||
Status: api.NodeStatus{
|
||||
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"},
|
||||
Status: api.NodeStatus{
|
||||
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"},
|
||||
Status: api.NodeStatus{
|
||||
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"},
|
||||
Status: api.NodeStatus{
|
||||
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"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeReady, Status: api.ConditionFull},
|
||||
{Type: api.NodeReachable, Status: api.ConditionNone}},
|
||||
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReachable, Status: api.ConditionFalse}},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -284,8 +284,8 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeReachable, Status: api.ConditionFull},
|
||||
{Type: "invalidValue", Status: api.ConditionNone}},
|
||||
{Type: api.NodeReachable, Status: api.ConditionTrue},
|
||||
{Type: "invalidValue", Status: api.ConditionFalse}},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user