Enable kubeadm upgrades to any version (#1709)

This commit is contained in:
Matthew Mosesohn 2017-09-27 14:48:18 +01:00 committed by GitHub
parent 327ed157ef
commit 689ded0413

View file

@ -70,7 +70,14 @@
notify: Master | restart kubelet notify: Master | restart kubelet
- name: kubeadm | Upgrade first master - 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 register: kubeadm_upgrade
# Retry is because upload config sometimes fails # Retry is because upload config sometimes fails
retries: 3 retries: 3
@ -124,7 +131,14 @@
notify: Master | restart kubelet notify: Master | restart kubelet
- name: kubeadm | Upgrade other masters - 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 register: kubeadm_upgrade
when: inventory_hostname != groups['kube-master']|first and (kubeadm_config.changed and admin_conf.stat.exists) 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 failed_when: kubeadm_upgrade.rc != 0 and "field is immutable" not in kubeadm_upgrade.stderr