mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-02 09:18:55 -03:30
calico upgrade to v3 (#3086)
* calico upgrade to v3 * update calico_rr version * add missing file * change contents of main.yml as it was left old version * enable network policy by default * remove unneeded task * Fix kubelet calico settings * fix when statement * switch back to node-kubeconfig.yaml
This commit is contained in:
committed by
Matthew Mosesohn
parent
f453567cce
commit
23fd3461bc
@@ -2,20 +2,12 @@
|
||||
- name: Set cert dir
|
||||
set_fact:
|
||||
calico_cert_dir: "{{ canal_cert_dir }}"
|
||||
when: kube_network_plugin == 'canal'
|
||||
when:
|
||||
- kube_network_plugin == 'canal'
|
||||
tags:
|
||||
- facts
|
||||
- canal
|
||||
|
||||
- name: Delete the old calico-policy-controller if it exist
|
||||
kube:
|
||||
name: calico-policy-controller
|
||||
kubectl: "{{bin_dir}}/kubectl"
|
||||
resource: rs
|
||||
namespace: "kube-system"
|
||||
state: absent
|
||||
run_once: true
|
||||
|
||||
- name: Create calico-kube-controllers manifests
|
||||
template:
|
||||
src: "{{item.file}}.j2"
|
||||
@@ -26,7 +18,9 @@
|
||||
- {name: calico-kube-controllers, file: calico-kube-cr.yml, type: clusterrole}
|
||||
- {name: calico-kube-controllers, file: calico-kube-crb.yml, type: clusterrolebinding}
|
||||
register: calico_kube_manifests
|
||||
when: inventory_hostname == groups['kube-master'][0] and not item|skipped
|
||||
when:
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
- rbac_enabled or item.type not in rbac_resources
|
||||
|
||||
- name: Start of Calico kube controllers
|
||||
kube:
|
||||
@@ -36,5 +30,8 @@
|
||||
resource: "{{item.item.type}}"
|
||||
filename: "{{kube_config_dir}}/{{item.item.file}}"
|
||||
state: "latest"
|
||||
with_items: "{{ calico_kube_manifests.results }}"
|
||||
when: inventory_hostname == groups['kube-master'][0] and not item|skipped
|
||||
with_items:
|
||||
- "{{ calico_kube_manifests.results }}"
|
||||
when:
|
||||
- inventory_hostname == groups['kube-master'][0]
|
||||
- not item|skipped
|
||||
|
||||
Reference in New Issue
Block a user