mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-07-06 22:08:12 -02:30
Flannel running as pod
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Calico | Install calicoctl bin
|
||||
synchronize:
|
||||
src: "{{ local_release_dir }}/calico/bin/calicoctl"
|
||||
@@ -18,6 +17,10 @@
|
||||
dest: /usr/bin/calicoctl
|
||||
state: link
|
||||
|
||||
- wait_for:
|
||||
port: 2379
|
||||
when: inventory_hostname in groups['kube-master']
|
||||
|
||||
- name: Calico | Check if calico network pool has already been configured
|
||||
uri:
|
||||
url: "http://127.0.0.1:2379/v2/keys/calico/v1/ipam/v4/pool"
|
||||
@@ -71,3 +74,16 @@
|
||||
|
||||
- name: Calico | Enable calico-node
|
||||
service: name=calico-node enabled=yes state=started
|
||||
|
||||
- name: Calico | Disable node mesh
|
||||
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']
|
||||
|
||||
- name: Calico | Configure peering with router(s)
|
||||
shell: calicoctl node bgp peer add {{ item.router_id }} as {{ item.as }}
|
||||
environment:
|
||||
ETCD_AUTHORITY: "{{ groups['etcd'][0] }}:2379"
|
||||
with_items: peers
|
||||
when: peer_with_router|default(false) and inventory_hostname in groups['kube-node']
|
||||
|
||||
Reference in New Issue
Block a user