Skip to content

Commit

Permalink
make kube-vip LeaderElection variables configurable (#11021)
Browse files Browse the repository at this point in the history
Signed-off-by: KubeKyrie <shaolong.qin@daocloud.io>
  • Loading branch information
KubeKyrie authored Mar 25, 2024
1 parent 01c86af commit baf4842
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions docs/kube-vip.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,11 @@ In addition, [load-balancing method](https://kube-vip.io/docs/installation/flags
```yaml
kube_vip_lb_fwdmethod: masquerade
```
If you want to adjust the parameters of [kube-vip LeaderElection](https://kube-vip.io/docs/installation/flags/#environment-variables):
```yaml
kube_vip_leaseduration: 30
kube_vip_renewdeadline: 20
kube_vip_retryperiod: 4
```
5 changes: 4 additions & 1 deletion roles/kubernetes/node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ kube_vip_address:
kube_vip_enableServicesElection: false
kube_vip_lb_enable: false
kube_vip_lb_fwdmethod: local
kube_vip_leaseduration: 5
kube_vip_renewdeadline: 3
kube_vip_retryperiod: 1

# Requests for load balancer app
loadbalancer_apiserver_memory_requests: 32M
Expand Down Expand Up @@ -258,4 +261,4 @@ conntrack_modules:
## Enable distributed tracing for kubelet
kubelet_tracing: false
kubelet_tracing_endpoint: 0.0.0.0:4317
kubelet_tracing_sampling_rate_per_million: 100
kubelet_tracing_sampling_rate_per_million: 100
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ spec:
- name: vip_leaderelection
value: "true"
- name: vip_leaseduration
value: "5"
value: {{ kube_vip_leaseduration | string | to_json }}
- name: vip_renewdeadline
value: "3"
value: {{ kube_vip_renewdeadline | string | to_json }}
- name: vip_retryperiod
value: "1"
value: {{ kube_vip_retryperiod | string | to_json }}
{% endif %}
{% if kube_vip_bgp_enabled %}
- name: bgp_enable
Expand Down

0 comments on commit baf4842

Please sign in to comment.