During pre-upgrade add a flag to always cordon (#7892)

* During pre-upgrade add a flag to always cordon

* empty

* empty

* empty

* Better default val
This commit is contained in:
Calvin Park 2021-08-30 10:56:09 -07:00 committed by GitHub
parent c8e090c17f
commit 9d3888a756
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -6,6 +6,7 @@ drain_nodes: true
drain_retries: 3
drain_retry_delay_seconds: 10
upgrade_node_always_cordon: false
upgrade_node_uncordon_after_drain_failure: true
upgrade_node_fail_if_drain_fails: true

View file

@ -39,7 +39,7 @@
- name: Set if node needs cordoning
set_fact:
needs_cordoning: >-
{% if kubectl_node_ready.stdout == "True" and not kubectl_node_schedulable.stdout -%}
{% if (kubectl_node_ready.stdout == "True" and not kubectl_node_schedulable.stdout) or upgrade_node_always_cordon -%}
true
{%- else -%}
false