mirror of
https://github.com/techno-tim/k3s-ansible.git
synced 2025-12-28 19:52:40 +01:00
k3s_server: add kube-vip BGP support
With the kube_vip_bgp parameter it is possible to enable the kube-vip BGP support (https://kube-vip.io/docs/modes/bgp/). The configuration is possible with the following new parameters: * kube_vip_bgp_routerid * kube_vip_bgp_as * kube_vip_bgp_peeraddress * kube_vip_bgp_peeras Signed-off-by: Christian Berendt <berendt@osism.tech>
This commit is contained in:
@@ -34,6 +34,18 @@ cilium_bgp_peer_asn: "64512"
|
|||||||
cilium_bgp_peer_address: "192.168.30.1"
|
cilium_bgp_peer_address: "192.168.30.1"
|
||||||
cilium_bgp_lb_cidr: "192.168.31.0/24" # cidr for cilium loadbalancer ipam
|
cilium_bgp_lb_cidr: "192.168.31.0/24" # cidr for cilium loadbalancer ipam
|
||||||
|
|
||||||
|
# enable kube-vip ARP broadcasts
|
||||||
|
kube_vip_arp: true
|
||||||
|
|
||||||
|
# enable kube-vip BGP peering
|
||||||
|
kube_vip_bgp: false
|
||||||
|
|
||||||
|
# bgp parameters for kube-vip
|
||||||
|
kube_vip_bgp_routerid: "127.0.0.1" # Defines the router ID for the BGP server
|
||||||
|
kube_vip_bgp_as: "64513" # Defines the AS for the BGP server
|
||||||
|
kube_vip_bgp_peeraddress: "192.168.30.1" # Defines the address for the BGP peer
|
||||||
|
kube_vip_bgp_peeras: "64512" # Defines the AS for the BGP peer
|
||||||
|
|
||||||
# apiserver_endpoint is virtual ip-address which will be configured on each master
|
# apiserver_endpoint is virtual ip-address which will be configured on each master
|
||||||
apiserver_endpoint: "192.168.30.222"
|
apiserver_endpoint: "192.168.30.222"
|
||||||
|
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
# will determine the right interface automatically at runtime.
|
# will determine the right interface automatically at runtime.
|
||||||
kube_vip_iface: null
|
kube_vip_iface: null
|
||||||
|
|
||||||
# Enables ARP broadcasts from Leader
|
|
||||||
kube_vip_arp: true
|
|
||||||
|
|
||||||
# Name of the master group
|
# Name of the master group
|
||||||
group_name_master: master
|
group_name_master: master
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ spec:
|
|||||||
- manager
|
- manager
|
||||||
env:
|
env:
|
||||||
- name: vip_arp
|
- name: vip_arp
|
||||||
value: "{{ 'true' if kube_vip_arp | bool else 'false' }}"
|
value: "{{ 'true' if kube_vip_arp | default(true) | bool else 'false' }}"
|
||||||
|
- name: bgp_enable
|
||||||
|
value: "{{ 'true' if kube_vip_bgp | default(false) | bool else 'false' }}"
|
||||||
- name: port
|
- name: port
|
||||||
value: "6443"
|
value: "6443"
|
||||||
{% if kube_vip_iface %}
|
{% if kube_vip_iface %}
|
||||||
@@ -54,6 +56,24 @@ spec:
|
|||||||
value: "2"
|
value: "2"
|
||||||
- name: address
|
- name: address
|
||||||
value: {{ apiserver_endpoint }}
|
value: {{ apiserver_endpoint }}
|
||||||
|
{% if kube_vip_bgp | default(false) | bool %}
|
||||||
|
{% if kube_vip_bgp_routerid is defined %}
|
||||||
|
- name: bgp_routerid
|
||||||
|
value: "{{ kube_vip_bgp_routerid }}"
|
||||||
|
{% endif %}
|
||||||
|
{% if kube_vip_bgp_as is defined %}
|
||||||
|
- name: bgp_as
|
||||||
|
value: "{{ kube_vip_bgp_as }}"
|
||||||
|
{% endif %}
|
||||||
|
{% if kube_vip_bgp_peeraddress is defined %}
|
||||||
|
- name: bgp_peeraddress
|
||||||
|
value: "{{ kube_vip_bgp_peeraddress }}"
|
||||||
|
{% endif %}
|
||||||
|
{% if kube_vip_bgp_peeras is defined %}
|
||||||
|
- name: bgp_peeras
|
||||||
|
value: "{{ kube_vip_bgp_peeras }}"
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
image: ghcr.io/kube-vip/kube-vip:{{ kube_vip_tag_version }}
|
image: ghcr.io/kube-vip/kube-vip:{{ kube_vip_tag_version }}
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: kube-vip
|
name: kube-vip
|
||||||
|
|||||||
Reference in New Issue
Block a user