diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 316c2428d7791ca6a4251f1d18d30c066db267a0..7397a450b15bdafc3c33334fb78717d1643474a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -267,6 +267,7 @@ before_script: CLOUD_REGION: us-east1-b UPGRADE_TEST: "basic" CLUSTER_MODE: ha + UPGRADE_TEST: "graceful" .rhel7_weave_variables: &rhel7_weave_variables # stage: deploy-gce-part1 @@ -288,7 +289,6 @@ before_script: CLOUD_IMAGE: debian-8-kubespray CLOUD_REGION: us-central1-b CLUSTER_MODE: default - UPGRADE_TEST: "graceful" .coreos_canal_variables: &coreos_canal_variables # stage: deploy-gce-part2 diff --git a/roles/upgrade/pre-upgrade/tasks/main.yml b/roles/upgrade/pre-upgrade/tasks/main.yml index 90b535d2e6d4b0375966f412852448eb648296c5..9b47c845bb3af11b0a1f25df54792fd07fd4f3f7 100644 --- a/roles/upgrade/pre-upgrade/tasks/main.yml +++ b/roles/upgrade/pre-upgrade/tasks/main.yml @@ -5,7 +5,13 @@ delegate_to: "{{ groups['kube-master'][0] }}" - name: Drain node - command: "{{ bin_dir }}/kubectl drain --force --ignore-daemonsets --grace-period 30 --delete-local-data {{ ansible_hostname }}" + command: >- + {{ bin_dir }}/kubectl drain + --force + --ignore-daemonsets + --grace-period {{ drain_grace_period }} + --timeout {{ drain_timeout }} + --delete-local-data {{ ansible_hostname }} delegate_to: "{{ groups['kube-master'][0] }}" - name: Sleep for grace period for draining