Merge pull request #3340 from wwt/master

Fixes Calico 3.x BGPPeer resources
This commit is contained in:
k8s-ci-robot 2018-09-19 04:43:35 -07:00 committed by GitHub
commit da4cc74498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -163,14 +163,13 @@
shell: >
echo '{
"apiVersion": "projectcalico.org/v3",
"kind": "bgpPeer",
"kind": "BGPPeer",
"metadata": {
"name": "{{ inventory_hostname }}-bgp"
"name": "{{ inventory_hostname }}-{{ item.router_id }}"
},
"spec": {
"asNumber": "{{ item.as }}",
"node": "{{ inventory_hostname }}",
"scope": "node",
"peerIP": "{{ item.router_id }}"
}}' | {{ bin_dir }}/calicoctl create --skip-exists -f -
retries: 4
@ -203,13 +202,12 @@
shell: >
echo '{
"apiVersion": "projectcalico.org/v3",
"kind": "bgpPeer",
"kind": "BGPPeer",
"metadata": {
"name": "{{ inventory_hostname }}"
"name": "{{ inventory_hostname }}-{{ hostvars[item]["calico_rr_ip"]|default(hostvars[item]["ip"])|default(hostvars[item]["ansible_default_ipv4"]["address"]) }}"
},
"spec": {
"asNumber": "{{ local_as | default(global_as_num)}}",
"scope": "node",
"node": "{{ inventory_hostname }}",
"peerIP": "{{ hostvars[item]["calico_rr_ip"]|default(hostvars[item]["ip"])|default(hostvars[item]["ansible_default_ipv4"]["address"]) }}"
}}' | {{ bin_dir }}/calicoctl create --skip-exists -f -