Remove ConditionSchedulable
This commit is contained in:
@@ -249,10 +249,8 @@ func (factory *ConfigFactory) pollMinions() (cache.Enumerator, error) {
|
||||
cond := node.Status.Conditions[i]
|
||||
conditionMap[cond.Type] = &cond
|
||||
}
|
||||
if condition, ok := conditionMap[api.NodeSchedulable]; ok {
|
||||
if condition.Status != api.ConditionTrue {
|
||||
continue
|
||||
}
|
||||
if node.Spec.Unschedulable {
|
||||
continue
|
||||
}
|
||||
if condition, ok := conditionMap[api.NodeReady]; ok {
|
||||
if condition.Status == api.ConditionTrue {
|
||||
|
@@ -148,10 +148,8 @@ func TestPollMinions(t *testing.T) {
|
||||
},
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{Name: "fiz"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Unschedulable: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -167,28 +165,34 @@ func TestPollMinions(t *testing.T) {
|
||||
ObjectMeta: api.ObjectMeta{Name: "fuz"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||
},
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Unschedulable: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{Name: "buz"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionFalse},
|
||||
{Type: api.NodeReady, Status: api.ConditionTrue},
|
||||
},
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Unschedulable: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foobar"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||
{Type: api.NodeReady, Status: api.ConditionFalse},
|
||||
},
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Unschedulable: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedCount: 3,
|
||||
@@ -218,18 +222,14 @@ func TestPollMinions(t *testing.T) {
|
||||
minions: []api.Node{
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{Name: "foo"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionTrue},
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Unschedulable: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
ObjectMeta: api.ObjectMeta{Name: "bar"},
|
||||
Status: api.NodeStatus{
|
||||
Conditions: []api.NodeCondition{
|
||||
{Type: api.NodeSchedulable, Status: api.ConditionFalse},
|
||||
},
|
||||
Spec: api.NodeSpec{
|
||||
Unschedulable: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user