Skip to content

Commit 31e84bd

Browse files
committed
fix: configuration of kube-vip per-service leader election
Previously used `enableServicesElection` is not an accepted environment variable but a field in the kube-vip YAML config file. * The related environment variable is `svc_election`, which is already present in the DaemonSet template * Use `rke2_kubevip_service_election_enable` to set the `svc_election` in DaemonSet template * Change default value to `true` to maintain original behavior Signed-off-by: Tomas Nestrojil <[email protected]>
1 parent f89e4ad commit 31e84bd

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ rke2_kubevip_ipvs_lb_enable: false
9090
# Enable layer 4 load balancing for control plane using IPVS kernel module
9191
# Must use kube-vip version 0.4.0 or later
9292

93-
rke2_kubevip_service_election_enable: false
93+
rke2_kubevip_service_election_enable: true
9494
# By default ARP mode provides a HA implementation of a VIP (your service IP address) which will receive traffic on the kube-vip leader.
9595
# To circumvent this kube-vip has implemented a new function which is "leader election per service",
9696
# instead of one node becoming the leader for all services an election is held across all kube-vip instances and the leader from that election becomes the holder of that service. Ultimately,

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ rke2_kubevip_ipvs_lb_enable: false
5151
# Enable layer 4 load balancing for control plane using IPVS kernel module
5252
# Must use kube-vip version 0.4.0 or later
5353

54-
rke2_kubevip_service_election_enable: false
54+
rke2_kubevip_service_election_enable: true
5555
# By default ARP mode provides a HA implementation of a VIP (your service IP address) which will receive traffic on the kube-vip leader.
5656
# To circumvent this kube-vip has implemented a new function which is "leader election per service",
5757
# instead of one node becoming the leader for all services an election is held across all kube-vip instances and the leader from that election becomes the holder of that service. Ultimately,

templates/kube-vip/kube-vip.yml.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ spec:
4949
- name: svc_enable
5050
value: "{{ rke2_kubevip_svc_enable }}"
5151
- name: svc_election
52-
value: "true"
53-
- name: enableServicesElection
5452
value: "{{ rke2_kubevip_service_election_enable }}"
5553
- name: vip_leaderelection
5654
value: "true"

0 commit comments

Comments
 (0)