mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-05-08 09:57:38 -02:30
Feat: make kube-vip BGP source configurable (#13044)
This commit is contained in:
@@ -63,6 +63,8 @@ kube_vip_bgppeers:
|
|||||||
# kube_vip_bgp_peeraddress:
|
# kube_vip_bgp_peeraddress:
|
||||||
# kube_vip_bgp_peerpass:
|
# kube_vip_bgp_peerpass:
|
||||||
# kube_vip_bgp_peeras:
|
# kube_vip_bgp_peeras:
|
||||||
|
# kube_vip_bgp_sourceip:
|
||||||
|
# kube_vip_bgp_sourceif:
|
||||||
```
|
```
|
||||||
|
|
||||||
If using [control plane load-balancing](https://kube-vip.io/docs/about/architecture/#control-plane-load-balancing):
|
If using [control plane load-balancing](https://kube-vip.io/docs/about/architecture/#control-plane-load-balancing):
|
||||||
|
|||||||
@@ -199,6 +199,8 @@ kube_vip_enabled: false
|
|||||||
# kube_vip_leasename: plndr-cp-lock
|
# kube_vip_leasename: plndr-cp-lock
|
||||||
# kube_vip_enable_node_labeling: false
|
# kube_vip_enable_node_labeling: false
|
||||||
# kube_vip_lb_fwdmethod: local
|
# kube_vip_lb_fwdmethod: local
|
||||||
|
# kube_vip_bgp_sourceip:
|
||||||
|
# kube_vip_bgp_sourceif:
|
||||||
|
|
||||||
# Node Feature Discovery
|
# Node Feature Discovery
|
||||||
node_feature_discovery_enabled: false
|
node_feature_discovery_enabled: false
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ kube_vip_leaseduration: 5
|
|||||||
kube_vip_renewdeadline: 3
|
kube_vip_renewdeadline: 3
|
||||||
kube_vip_retryperiod: 1
|
kube_vip_retryperiod: 1
|
||||||
kube_vip_enable_node_labeling: false
|
kube_vip_enable_node_labeling: false
|
||||||
|
kube_vip_bgp_sourceip:
|
||||||
|
kube_vip_bgp_sourceif:
|
||||||
|
|
||||||
# Requests for load balancer app
|
# Requests for load balancer app
|
||||||
loadbalancer_apiserver_memory_requests: 32M
|
loadbalancer_apiserver_memory_requests: 32M
|
||||||
|
|||||||
@@ -6,6 +6,17 @@
|
|||||||
- kube_proxy_mode == 'ipvs' and not kube_proxy_strict_arp
|
- kube_proxy_mode == 'ipvs' and not kube_proxy_strict_arp
|
||||||
- kube_vip_arp_enabled
|
- kube_vip_arp_enabled
|
||||||
|
|
||||||
|
- name: Kube-vip | Check mutually exclusive BGP source settings
|
||||||
|
vars:
|
||||||
|
kube_vip_bgp_sourceip_normalized: "{{ kube_vip_bgp_sourceip | default('', true) | string | trim }}"
|
||||||
|
kube_vip_bgp_sourceif_normalized: "{{ kube_vip_bgp_sourceif | default('', true) | string | trim }}"
|
||||||
|
assert:
|
||||||
|
that:
|
||||||
|
- kube_vip_bgp_sourceip_normalized == '' or kube_vip_bgp_sourceif_normalized == ''
|
||||||
|
fail_msg: "kube-vip allows only one of kube_vip_bgp_sourceip or kube_vip_bgp_sourceif."
|
||||||
|
when:
|
||||||
|
- kube_vip_bgp_enabled | default(false)
|
||||||
|
|
||||||
- name: Kube-vip | Check if super-admin.conf exists
|
- name: Kube-vip | Check if super-admin.conf exists
|
||||||
stat:
|
stat:
|
||||||
path: "{{ kube_config_dir }}/super-admin.conf"
|
path: "{{ kube_config_dir }}/super-admin.conf"
|
||||||
|
|||||||
@@ -85,6 +85,16 @@ spec:
|
|||||||
value: {{ kube_vip_bgp_peerpass | to_json }}
|
value: {{ kube_vip_bgp_peerpass | to_json }}
|
||||||
- name: bgp_peeras
|
- name: bgp_peeras
|
||||||
value: {{ kube_vip_bgp_peeras | string | to_json }}
|
value: {{ kube_vip_bgp_peeras | string | to_json }}
|
||||||
|
{% set kube_vip_bgp_sourceip_normalized = kube_vip_bgp_sourceip | default('', true) | string | trim %}
|
||||||
|
{% if kube_vip_bgp_sourceip_normalized %}
|
||||||
|
- name: bgp_sourceip
|
||||||
|
value: {{ kube_vip_bgp_sourceip_normalized | to_json }}
|
||||||
|
{% endif %}
|
||||||
|
{% set kube_vip_bgp_sourceif_normalized = kube_vip_bgp_sourceif | default('', true) | string | trim %}
|
||||||
|
{% if kube_vip_bgp_sourceif_normalized %}
|
||||||
|
- name: bgp_sourceif
|
||||||
|
value: {{ kube_vip_bgp_sourceif_normalized | to_json }}
|
||||||
|
{% endif %}
|
||||||
{% if kube_vip_bgppeers %}
|
{% if kube_vip_bgppeers %}
|
||||||
- name: bgp_peers
|
- name: bgp_peers
|
||||||
value: {{ kube_vip_bgppeers | join(',') | to_json }}
|
value: {{ kube_vip_bgppeers | join(',') | to_json }}
|
||||||
|
|||||||
Reference in New Issue
Block a user