Fix calico peering with router(s) (#3547)

This commit is contained in:
Erwan Miran 2018-10-24 07:19:50 +02:00 committed by k8s-ci-robot
parent 7e84de2ae1
commit 4f12ba00d1

View file

@ -221,7 +221,7 @@
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
with_items:
- "{{ peers|rejectattr('scope','equalto', 'global')|default([]) }}"
- "{{ peers|selectattr('scope','undefined')|list|default([]) | union(peers|selectattr('scope','defined')|selectattr('scope','equalto', 'node')|list|default([])) }}"
when:
- calico_version is version('v3.0.0', '>=')
- peer_with_router|default(false)
@ -238,7 +238,7 @@
| {{ bin_dir }}/calicoctl create --skip-exists -f -
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
with_items: "{{ peers|rejectattr('scope','equalto', 'global')|default([]) }}"
with_items: "{{ peers|selectattr('scope','undefined')|list|default([]) | union(peers|selectattr('scope','defined')|selectattr('scope','equalto', 'node')|list|default([])) }}"
when:
- calico_version | version_compare('v3.0.0', '<')
- peer_with_router|default(false)
@ -259,7 +259,7 @@
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
with_items:
- "{{ peers|selectattr('scope','equalto', 'global')|default([]) }}"
- "{{ peers|selectattr('scope','defined')|selectattr('scope','equalto', 'global')|list|default([]) }}"
run_once: true
when:
- calico_version | version_compare('v3.0.0', '>=')
@ -277,7 +277,7 @@
| {{ bin_dir }}/calicoctl create --skip-exists -f -
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
with_items: "{{ peers|selectattr('scope','equalto', 'global')|default([]) }}"
with_items: "{{ peers|selectattr('scope','defined')|selectattr('scope','equalto', 'global')|default([]) }}"
run_once: true
when:
- calico_version is version('v3.0.0', '<')