Skip to content
Snippets Groups Projects
Commit 595e93e6 authored by Smaine Kahlouch's avatar Smaine Kahlouch
Browse files

Peer with router configuration is made on the first etcd node

parent 5f4e01ce
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
- name: Calico | Configure calico network pool - name: Calico | Configure calico network pool
shell: calicoctl pool add {{ kube_pods_subnet }} shell: calicoctl pool add {{ kube_pods_subnet }}
environment:
ETCD_AUTHORITY: "{{ groups['etcd'][0] }}:2379"
run_once: true run_once: true
when: calico_conf.status == 404 when: calico_conf.status == 404
delegate_to: "{{ groups['etcd'][0] }}" delegate_to: "{{ groups['etcd'][0] }}"
...@@ -63,9 +61,13 @@ ...@@ -63,9 +61,13 @@
- name: Calico | Disable node mesh - name: Calico | Disable node mesh
shell: calicoctl bgp node-mesh off shell: calicoctl bgp node-mesh off
environment:
ETCD_AUTHORITY: "{{ groups['etcd'][0] }}:2379"
when: peer_with_router|default(false) and inventory_hostname in groups['kube-node'] when: peer_with_router|default(false) and inventory_hostname in groups['kube-node']
- name: Calico | Configure peering with router(s) - name: Calico | Configure peering with router(s)
shell: calicoctl node bgp peer add {{ item.router_id }} as {{ item.as }} shell: calicoctl node bgp peer add {{ item.router_id }} as {{ item.as }}
environment:
ETCD_AUTHORITY: "{{ groups['etcd'][0] }}:2379"
with_items: peers with_items: peers
when: peer_with_router|default(false) and inventory_hostname in groups['kube-node'] when: peer_with_router|default(false) and inventory_hostname in groups['kube-node']
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment