Browse Source

Uses etcdv3 for calico 3 rr_v4 resources

pull/3355/head
Kevin Schuck 6 years ago
parent
commit
6f9f80acee
1 changed files with 21 additions and 0 deletions
  1. 21
      roles/network_plugin/calico/rr/tasks/main.yml

21
roles/network_plugin/calico/rr/tasks/main.yml

@ -47,6 +47,25 @@
notify: restart calico-rr notify: restart calico-rr
- name: Calico-rr | Configure route reflector - name: Calico-rr | Configure route reflector
command: |-
{{ bin_dir }}/etcdctl \
--endpoints={{ etcd_access_addresses }} \
--cert={{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}.pem \
--key={{ etcd_cert_dir }}/admin-{{ groups['etcd'][0] }}-key.pem \
put /calico/bgp/v1/rr_v4/{{ rr_ip }} \
'{
"ip": "{{ rr_ip }}",
"cluster_id": "{{ cluster_id }}"
}'
environment:
ETCDCTL_API: 3
retries: 4
delay: "{{ retry_stagger | random + 3 }}"
delegate_to: "{{groups['etcd'][0]}}"
when:
- calico_version | version_compare("v3.0.0", ">=")
- name: Calico-rr | Configure route reflector (legacy)
command: |- command: |-
{{ bin_dir }}/etcdctl \ {{ bin_dir }}/etcdctl \
--peers={{ etcd_access_addresses }} \ --peers={{ etcd_access_addresses }} \
@ -60,6 +79,8 @@
retries: 4 retries: 4
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"
delegate_to: "{{groups['etcd'][0]}}" delegate_to: "{{groups['etcd'][0]}}"
when:
- calico_version | version_compare("v3.0.0", "<")
- meta: flush_handlers - meta: flush_handlers

Loading…
Cancel
Save