mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-07 11:41:16 -03:30
Ensures BGPPeer resource names are unique
This commit is contained in:
@@ -165,7 +165,7 @@
|
|||||||
"apiVersion": "projectcalico.org/v3",
|
"apiVersion": "projectcalico.org/v3",
|
||||||
"kind": "BGPPeer",
|
"kind": "BGPPeer",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "{{ inventory_hostname }}-bgp"
|
"name": "{{ inventory_hostname }}-{{ item.router_id }}"
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"asNumber": "{{ item.as }}",
|
"asNumber": "{{ item.as }}",
|
||||||
@@ -204,7 +204,7 @@
|
|||||||
"apiVersion": "projectcalico.org/v3",
|
"apiVersion": "projectcalico.org/v3",
|
||||||
"kind": "BGPPeer",
|
"kind": "BGPPeer",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "{{ inventory_hostname }}"
|
"name": "{{ inventory_hostname }}-{{ hostvars[item]["calico_rr_ip"]|default(hostvars[item]["ip"])|default(hostvars[item]["ansible_default_ipv4"]["address"]) }}"
|
||||||
},
|
},
|
||||||
"spec": {
|
"spec": {
|
||||||
"asNumber": "{{ local_as | default(global_as_num)}}",
|
"asNumber": "{{ local_as | default(global_as_num)}}",
|
||||||
|
|||||||
Reference in New Issue
Block a user