From ef34c3ed6dd1dd00606535d184cdda5d4e421aec Mon Sep 17 00:00:00 2001 From: kakkotetsu Date: Mon, 20 Dec 2021 14:51:42 +0900 Subject: [PATCH] add support for Calico BGPPeer sourceAddress --- docs/calico_peer_example/new-york.yml | 2 ++ docs/calico_peer_example/paris.yml | 2 ++ roles/network_plugin/calico/tasks/install.yml | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/calico_peer_example/new-york.yml b/docs/calico_peer_example/new-york.yml index dd4d8125b7b..af497a9a910 100644 --- a/docs/calico_peer_example/new-york.yml +++ b/docs/calico_peer_example/new-york.yml @@ -2,8 +2,10 @@ # peers: # - router_id: "10.99.0.34" # as: "65xxx" +# sourceaddress: "None" # - router_id: "10.99.0.35" # as: "65xxx" +# sourceaddress: "None" # loadbalancer_apiserver: # address: "10.99.0.44" diff --git a/docs/calico_peer_example/paris.yml b/docs/calico_peer_example/paris.yml index 6d4ab417971..1768e030589 100644 --- a/docs/calico_peer_example/paris.yml +++ b/docs/calico_peer_example/paris.yml @@ -2,8 +2,10 @@ # peers: # - router_id: "10.99.0.2" # as: "65xxx" +# sourceaddress: "None" # - router_id: "10.99.0.3" # as: "65xxx" +# sourceaddress: "None" # loadbalancer_apiserver: # address: "10.99.0.21" diff --git a/roles/network_plugin/calico/tasks/install.yml b/roles/network_plugin/calico/tasks/install.yml index e2ad4a78cd9..076b8b50a5c 100644 --- a/roles/network_plugin/calico/tasks/install.yml +++ b/roles/network_plugin/calico/tasks/install.yml @@ -418,7 +418,8 @@ "spec": { "asNumber": "{{ item.as }}", "node": "{{ inventory_hostname }}", - "peerIP": "{{ item.router_id }}" + "peerIP": "{{ item.router_id }}", + "sourceAddress": "{{ item.sourceaddress|default('UseNodeIP') }}" }} register: output retries: 4