|
@ -44,8 +44,12 @@ |
|
|
- { role: kubespray-defaults } |
|
|
- { role: kubespray-defaults } |
|
|
- { role: bootstrap-os, tags: bootstrap-os} |
|
|
- { role: bootstrap-os, tags: bootstrap-os} |
|
|
|
|
|
|
|
|
|
|
|
- name: Gather facts |
|
|
|
|
|
import_playbook: facts.yml |
|
|
|
|
|
|
|
|
- name: Download images to ansible host cache via first kube-master node |
|
|
- name: Download images to ansible host cache via first kube-master node |
|
|
hosts: kube-master[0] |
|
|
hosts: kube-master[0] |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
roles: |
|
|
roles: |
|
|
- { role: kubespray-defaults, when: "not skip_downloads and download_run_once and not download_localhost"} |
|
|
- { role: kubespray-defaults, when: "not skip_downloads and download_run_once and not download_localhost"} |
|
@ -55,6 +59,7 @@ |
|
|
|
|
|
|
|
|
- name: Prepare nodes for upgrade |
|
|
- name: Prepare nodes for upgrade |
|
|
hosts: k8s-cluster:etcd:calico-rr |
|
|
hosts: k8s-cluster:etcd:calico-rr |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
roles: |
|
|
roles: |
|
|
- { role: kubespray-defaults } |
|
|
- { role: kubespray-defaults } |
|
@ -64,6 +69,7 @@ |
|
|
|
|
|
|
|
|
- name: Upgrade container engine on non-cluster nodes |
|
|
- name: Upgrade container engine on non-cluster nodes |
|
|
hosts: etcd:calico-rr:!k8s-cluster |
|
|
hosts: etcd:calico-rr:!k8s-cluster |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
serial: "{{ serial | default('20%') }}" |
|
|
serial: "{{ serial | default('20%') }}" |
|
|
roles: |
|
|
roles: |
|
@ -72,6 +78,7 @@ |
|
|
environment: "{{ proxy_env }}" |
|
|
environment: "{{ proxy_env }}" |
|
|
|
|
|
|
|
|
- hosts: etcd |
|
|
- hosts: etcd |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
roles: |
|
|
roles: |
|
|
- { role: kubespray-defaults } |
|
|
- { role: kubespray-defaults } |
|
@ -83,6 +90,7 @@ |
|
|
when: not etcd_kubeadm_enabled | default(false) |
|
|
when: not etcd_kubeadm_enabled | default(false) |
|
|
|
|
|
|
|
|
- hosts: k8s-cluster |
|
|
- hosts: k8s-cluster |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
roles: |
|
|
roles: |
|
|
- { role: kubespray-defaults } |
|
|
- { role: kubespray-defaults } |
|
@ -94,6 +102,7 @@ |
|
|
when: not etcd_kubeadm_enabled | default(false) |
|
|
when: not etcd_kubeadm_enabled | default(false) |
|
|
|
|
|
|
|
|
- name: Handle upgrades to master components first to maintain backwards compat. |
|
|
- name: Handle upgrades to master components first to maintain backwards compat. |
|
|
|
|
|
gather_facts: False |
|
|
hosts: kube-master |
|
|
hosts: kube-master |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
serial: 1 |
|
|
serial: 1 |
|
@ -112,6 +121,7 @@ |
|
|
|
|
|
|
|
|
- name: Upgrade calico and external cloud provider on all masters and nodes |
|
|
- name: Upgrade calico and external cloud provider on all masters and nodes |
|
|
hosts: kube-master:kube-node |
|
|
hosts: kube-master:kube-node |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
serial: "{{ serial | default('20%') }}" |
|
|
serial: "{{ serial | default('20%') }}" |
|
|
roles: |
|
|
roles: |
|
@ -123,6 +133,7 @@ |
|
|
|
|
|
|
|
|
- name: Finally handle worker upgrades, based on given batch size |
|
|
- name: Finally handle worker upgrades, based on given batch size |
|
|
hosts: kube-node:!kube-master |
|
|
hosts: kube-node:!kube-master |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
serial: "{{ serial | default('20%') }}" |
|
|
serial: "{{ serial | default('20%') }}" |
|
|
roles: |
|
|
roles: |
|
@ -136,6 +147,7 @@ |
|
|
environment: "{{ proxy_env }}" |
|
|
environment: "{{ proxy_env }}" |
|
|
|
|
|
|
|
|
- hosts: kube-master[0] |
|
|
- hosts: kube-master[0] |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: true |
|
|
any_errors_fatal: true |
|
|
roles: |
|
|
roles: |
|
|
- { role: kubespray-defaults } |
|
|
- { role: kubespray-defaults } |
|
@ -143,6 +155,7 @@ |
|
|
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] } |
|
|
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] } |
|
|
|
|
|
|
|
|
- hosts: calico-rr |
|
|
- hosts: calico-rr |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
roles: |
|
|
roles: |
|
|
- { role: kubespray-defaults } |
|
|
- { role: kubespray-defaults } |
|
@ -150,6 +163,7 @@ |
|
|
environment: "{{ proxy_env }}" |
|
|
environment: "{{ proxy_env }}" |
|
|
|
|
|
|
|
|
- hosts: kube-master |
|
|
- hosts: kube-master |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
roles: |
|
|
roles: |
|
|
- { role: kubespray-defaults } |
|
|
- { role: kubespray-defaults } |
|
@ -157,6 +171,7 @@ |
|
|
environment: "{{ proxy_env }}" |
|
|
environment: "{{ proxy_env }}" |
|
|
|
|
|
|
|
|
- hosts: k8s-cluster |
|
|
- hosts: k8s-cluster |
|
|
|
|
|
gather_facts: False |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" |
|
|
roles: |
|
|
roles: |
|
|
- { role: kubespray-defaults } |
|
|
- { role: kubespray-defaults } |
|
|