From 21e8b96e22342199b97a7129b5d1d9641149c1ad Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Tue, 28 Nov 2023 03:14:51 +0100 Subject: [PATCH] Drop the drain check for kubectl > v1.10.0 (#10657) Older versions are unsupported for a long time. --- roles/upgrade/pre-upgrade/tasks/main.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/roles/upgrade/pre-upgrade/tasks/main.yml b/roles/upgrade/pre-upgrade/tasks/main.yml index 58dfee0a9..c93e9f14e 100644 --- a/roles/upgrade/pre-upgrade/tasks/main.yml +++ b/roles/upgrade/pre-upgrade/tasks/main.yml @@ -56,23 +56,6 @@ delegate_to: "{{ groups['kube_control_plane'][0] }}" changed_when: true - - name: Check kubectl version - command: "{{ kubectl }} version --client --short" - register: kubectl_version - delegate_to: "{{ groups['kube_control_plane'][0] }}" - run_once: yes - changed_when: false - when: - - drain_nodes - - drain_pod_selector - - - name: Ensure minimum version for drain label selector if necessary - assert: - that: "kubectl_version.stdout.split(' ')[-1] is version('v1.10.0', '>=')" - when: - - drain_nodes - - drain_pod_selector - - name: Drain node command: >- {{ kubectl }} drain