From d18cc38586970d818e6873dc59c7474f48fd5903 Mon Sep 17 00:00:00 2001 From: Mohamed Zaian Date: Thu, 14 Oct 2021 11:25:19 +0200 Subject: [PATCH] Replcae deprecated --delete-local-data in pre-remove/pre-upgrade tasks (#8081) --- roles/remove-node/pre-remove/tasks/main.yml | 2 +- roles/upgrade/pre-upgrade/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/remove-node/pre-remove/tasks/main.yml b/roles/remove-node/pre-remove/tasks/main.yml index 80746acda..2344bc3b1 100644 --- a/roles/remove-node/pre-remove/tasks/main.yml +++ b/roles/remove-node/pre-remove/tasks/main.yml @@ -14,7 +14,7 @@ --ignore-daemonsets --grace-period {{ drain_grace_period }} --timeout {{ drain_timeout }} - --delete-local-data {{ hostvars[item]['kube_override_hostname']|default(item) }} + --delete-emptydir-data {{ hostvars[item]['kube_override_hostname']|default(item) }} loop: "{{ node.split(',') | default(groups['kube_node']) }}" # ignore servers that are not nodes when: hostvars[item]['kube_override_hostname']|default(item) in nodes.stdout_lines diff --git a/roles/upgrade/pre-upgrade/tasks/main.yml b/roles/upgrade/pre-upgrade/tasks/main.yml index ef28189b3..192c73875 100644 --- a/roles/upgrade/pre-upgrade/tasks/main.yml +++ b/roles/upgrade/pre-upgrade/tasks/main.yml @@ -75,7 +75,7 @@ --ignore-daemonsets --grace-period {{ drain_grace_period }} --timeout {{ drain_timeout }} - --delete-local-data {{ kube_override_hostname|default(inventory_hostname) }} + --delete-emptydir-data {{ kube_override_hostname|default(inventory_hostname) }} {% if drain_pod_selector %}--pod-selector '{{ drain_pod_selector }}'{% endif %} when: drain_nodes register: result