Allow admin user to explicitly unschedule the node

Setting Unschedulable on the node will not touch any existing pods
on the node but will block scheduling of new pods on the node.
This commit is contained in:
Ravi Sankar Penta
2015-02-17 12:03:14 -08:00
parent 07c2035630
commit f6ecec5880
17 changed files with 257 additions and 34 deletions

View File

@@ -2106,6 +2106,21 @@ func TestValidateMinionUpdate(t *testing.T) {
Labels: map[string]string{"Foo": "baz"},
},
}, true},
{api.Node{
ObjectMeta: api.ObjectMeta{
Name: "foo",
},
Spec: api.NodeSpec{
Unschedulable: false,
},
}, api.Node{
ObjectMeta: api.ObjectMeta{
Name: "foo",
},
Spec: api.NodeSpec{
Unschedulable: true,
},
}, true},
}
for i, test := range tests {
errs := ValidateMinionUpdate(&test.oldMinion, &test.minion)