|
|
@ -101,8 +101,8 @@ |
|
|
|
run_once: true |
|
|
|
delegate_to: "{{ groups['kube-master'][0] }}" |
|
|
|
when: |
|
|
|
- calico_upgrade_enabled or calico_version_on_server.stdout|version_compare('v3.0.0', '>') |
|
|
|
- 'calico_conf.stdout == "0"' |
|
|
|
- calico_version | version_compare("v3.0.0", ">=") |
|
|
|
|
|
|
|
- name: Calico | Configure calico network pool (legacy) |
|
|
|
shell: > |
|
|
@ -118,9 +118,8 @@ |
|
|
|
run_once: true |
|
|
|
delegate_to: "{{ groups['kube-master'][0] }}" |
|
|
|
when: |
|
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '<') |
|
|
|
- not calico_upgrade_enabled |
|
|
|
- 'calico_conf.stdout == "0"' |
|
|
|
- calico_version | version_compare("v3.0.0", "<") |
|
|
|
|
|
|
|
- name: "Determine nodeToNodeMesh needed state" |
|
|
|
set_fact: |
|
|
@ -145,20 +144,19 @@ |
|
|
|
run_once: true |
|
|
|
delegate_to: "{{ groups['kube-master'][0] }}" |
|
|
|
when: |
|
|
|
- calico_upgrade_enabled or calico_version_on_server.stdout|version_compare('v3.0.0', '>') |
|
|
|
- calico_version | version_compare('v3.0.0', '>=') |
|
|
|
|
|
|
|
- name: Calico | Set global as_num (legacy) |
|
|
|
command: "{{ bin_dir}}/calicoctl config set asNumber {{ global_as_num }}" |
|
|
|
run_once: true |
|
|
|
when: |
|
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '<') |
|
|
|
- not calico_upgrade_enabled |
|
|
|
- calico_version | version_compare('v3.0.0', '<') |
|
|
|
|
|
|
|
- name: Calico | Disable node mesh (legacy) |
|
|
|
command: "{{ bin_dir }}/calicoctl config set nodeToNodeMesh off" |
|
|
|
run_once: yes |
|
|
|
when: |
|
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '<') |
|
|
|
- not calico_upgrade_enabled |
|
|
|
- calico_version | version_compare('v3.0.0', '<') |
|
|
|
- nodeToMeshEnabled|default(True) |
|
|
|
|
|
|
|
- name: Calico | Configure peering with router(s) |
|
|
@ -180,7 +178,7 @@ |
|
|
|
with_items: |
|
|
|
- "{{ peers|default([]) }}" |
|
|
|
when: |
|
|
|
- calico_upgrade_enabled or calico_version_on_server.stdout|version_compare('v3.0.0', '>') |
|
|
|
- calico_version | version_compare('v3.0.0', '>=') |
|
|
|
- peer_with_router|default(false) |
|
|
|
- inventory_hostname in groups['k8s-cluster'] |
|
|
|
|
|
|
@ -197,8 +195,7 @@ |
|
|
|
delay: "{{ retry_stagger | random + 3 }}" |
|
|
|
with_items: "{{ peers|default([]) }}" |
|
|
|
when: |
|
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '<') |
|
|
|
- not calico_upgrade_enabled |
|
|
|
- calico_version | version_compare('v3.0.0', '<') |
|
|
|
- peer_with_router|default(false) |
|
|
|
- inventory_hostname in groups['k8s-cluster'] |
|
|
|
|
|
|
@ -221,7 +218,7 @@ |
|
|
|
with_items: |
|
|
|
- "{{ groups['calico-rr'] | default([]) }}" |
|
|
|
when: |
|
|
|
- calico_upgrade_enabled or calico_version_on_server.stdout|version_compare('v3.0.0', '>') |
|
|
|
- calico_version | version_compare('v3.0.0', '>=') |
|
|
|
- peer_with_calico_rr|default(false) |
|
|
|
- inventory_hostname in groups['k8s-cluster'] |
|
|
|
- hostvars[item]['cluster_id'] == cluster_id |
|
|
@ -241,7 +238,7 @@ |
|
|
|
delay: "{{ retry_stagger | random + 3 }}" |
|
|
|
with_items: "{{ groups['calico-rr'] | default([]) }}" |
|
|
|
when: |
|
|
|
- calico_version_on_server.stdout|version_compare('v3.0.0', '<') |
|
|
|
- calico_version | version_compare('v3.0.0', '<') |
|
|
|
- not calico_upgrade_enabled |
|
|
|
- peer_with_calico_rr|default(false) |
|
|
|
- hostvars[item]['cluster_id'] == cluster_id |
|
|
|