Skip to content

Commit

Permalink
add bgp_sourceip
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolin committed Dec 10, 2024
1 parent 3596322 commit 3fb1837
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions molecule/bgp/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ provisioner:
kube_vip_mode: bgp
kube_vip_bgp_routerid: 172.17.0.100
kube_vip_bgp_peeraddress: "{{ ansible_facts['default_ipv4'].address }}"
kube_vip_bgp_sourceip: 172.17.0.100
kube_vip_bgp_multihop: true
verifier:
name: ansible
3 changes: 3 additions & 0 deletions roles/kube_vip/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ kube_vip_mode: arp

# password to work with a single BGP Peer, if BGP is enabled
# kube_vip_bgp_peerpass:

# Determines which IP address BGP should peer from
# kube_vip_bgp_sourceip: 192.168.0.2
8 changes: 6 additions & 2 deletions roles/kube_vip/templates/kube-vip.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ spec:
{% if kube_vip_bgp_peers is defined %}
- name: bgp_peers
value: "{{ kube_vip_bgp_peers }}"
{% endif %}
{% endif %}
{% endif %}
{% if kube_vip_bgp_sourceip is defined %}
- name: bgp_sourceip
value: "{{ kube_vip_bgp_sourceip }}"
{% endif %}
{% endif %}
- name: address
value: "{{ kube_vip_address }}"
- name: prometheus_server
Expand Down

0 comments on commit 3fb1837

Please sign in to comment.