Replcae deprecated --delete-local-data in pre-remove/pre-upgrade tasks (#8081)

This commit is contained in:
Mohamed Zaian 2021-10-14 11:25:19 +02:00 committed by GitHub
parent cee481f63d
commit d18cc38586
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@
--ignore-daemonsets --ignore-daemonsets
--grace-period {{ drain_grace_period }} --grace-period {{ drain_grace_period }}
--timeout {{ drain_timeout }} --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']) }}" loop: "{{ node.split(',') | default(groups['kube_node']) }}"
# ignore servers that are not nodes # ignore servers that are not nodes
when: hostvars[item]['kube_override_hostname']|default(item) in nodes.stdout_lines when: hostvars[item]['kube_override_hostname']|default(item) in nodes.stdout_lines

View file

@ -75,7 +75,7 @@
--ignore-daemonsets --ignore-daemonsets
--grace-period {{ drain_grace_period }} --grace-period {{ drain_grace_period }}
--timeout {{ drain_timeout }} --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 %} {% if drain_pod_selector %}--pod-selector '{{ drain_pod_selector }}'{% endif %}
when: drain_nodes when: drain_nodes
register: result register: result