mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user