Stop deleting DaemonSet pods during drain.

We do this because they will be recreated immediately by the
DaemonSet Controller.  In addition, we also require a specific flag
(--ignore-daemonsets) when there are DaemonSet pods on the node.
This commit is contained in:
Matt Liggett
2016-01-27 10:27:14 -08:00
parent 635cf5877f
commit f2d5375bc0
6 changed files with 96 additions and 22 deletions

View File

@@ -323,8 +323,18 @@ func TestDrain(t *testing.T) {
pods: []api.Pod{ds_pod},
rcs: []api.ReplicationController{rc},
args: []string{"node"},
expectFatal: true,
expectDelete: false,
},
{
description: "DS-managed pod with --ignore-daemonsets",
node: node,
expected: cordoned_node,
pods: []api.Pod{ds_pod},
rcs: []api.ReplicationController{rc},
args: []string{"node", "--ignore-daemonsets"},
expectFatal: false,
expectDelete: true,
expectDelete: false,
},
{
description: "Job-managed pod",