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 cd75046 commit e81649c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 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
4 changes: 4 additions & 0 deletions roles/kube_vip/templates/kube-vip.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ spec:
- name: bgp_peers
value: "{{ kube_vip_bgp_peers }}"
{% endif %}
{% if kube_vip_bgp_sourceip is defined %}
- name: bgp_sourceip
value: "{{ kube_vip_bgp_sourceip }}"
{% endif %}
{% endif %}
- name: address
value: "{{ kube_vip_address }}"
Expand Down

0 comments on commit e81649c

Please sign in to comment.