Skip to content

Commit

Permalink
allow overriding calico peers names and avoid ipv6 naming issues (kub…
Browse files Browse the repository at this point in the history
  • Loading branch information
cristicalin authored and sakuraiyuta committed Apr 16, 2022
1 parent 73306ee commit 97427af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/network_plugin/calico/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
{"apiVersion": "projectcalico.org/v3",
"kind": "BGPPeer",
"metadata": {
"name": "global-{{ item.router_id }}"
"name": "global-{{ item.name | default(item.router_id|replace(':','-')) }}"
},
"spec": {
"asNumber": "{{ item.as }}",
Expand Down Expand Up @@ -381,7 +381,7 @@
{"apiVersion": "projectcalico.org/v3",
"kind": "BGPPeer",
"metadata": {
"name": "{{ inventory_hostname }}-{{ item.router_id }}"
"name": "{{ inventory_hostname }}-{{ item.name | default(item.router_id|replace(':','-')) }}"
},
"spec": {
"asNumber": "{{ item.as }}",
Expand Down

0 comments on commit 97427af

Please sign in to comment.