Enable kubeadm upgrades to any version (#1709)
This commit is contained in:
parent
327ed157ef
commit
689ded0413
1 changed files with 16 additions and 2 deletions
|
@ -70,7 +70,14 @@
|
|||
notify: Master | restart kubelet
|
||||
|
||||
- name: kubeadm | Upgrade first master
|
||||
command: timeout -k 240s 240s {{ bin_dir }}/kubeadm upgrade apply --config={{ kube_config_dir }}/kubeadm-config.yaml {{ kube_version }} --skip-preflight-checks
|
||||
command: >-
|
||||
timeout -k 240s 240s
|
||||
{{ bin_dir }}/kubeadm
|
||||
upgrade apply -y {{ kube_version }}
|
||||
--config={{ kube_config_dir }}/kubeadm-config.yaml
|
||||
--skip-preflight-checks
|
||||
--allow-experimental-upgrades
|
||||
--allow-release-candidate-upgrades
|
||||
register: kubeadm_upgrade
|
||||
# Retry is because upload config sometimes fails
|
||||
retries: 3
|
||||
|
@ -124,7 +131,14 @@
|
|||
notify: Master | restart kubelet
|
||||
|
||||
- name: kubeadm | Upgrade other masters
|
||||
command: timeout -k 240s 240s {{ bin_dir }}/kubeadm upgrade apply --config={{ kube_config_dir }}/kubeadm-config.yaml {{ kube_version }} --skip-preflight-checks
|
||||
command: >-
|
||||
timeout -k 240s 240s
|
||||
{{ bin_dir }}/kubeadm
|
||||
upgrade apply -y {{ kube_version }}
|
||||
--config={{ kube_config_dir }}/kubeadm-config.yaml
|
||||
--skip-preflight-checks
|
||||
--allow-experimental-upgrades
|
||||
--allow-release-candidate-upgrades
|
||||
register: kubeadm_upgrade
|
||||
when: inventory_hostname != groups['kube-master']|first and (kubeadm_config.changed and admin_conf.stat.exists)
|
||||
failed_when: kubeadm_upgrade.rc != 0 and "field is immutable" not in kubeadm_upgrade.stderr
|
||||
|
|
Loading…
Reference in a new issue