treasuremap/manifests/function/k8scontrol-ha/vrrp_keepalived_patch.yaml

39 lines
1.1 KiB
YAML

- op: add
path: "/spec/kubeadmConfigSpec/files/-"
value:
path: /etc/keepalived/keepalived.conf
content: |
! Configuration File for keepalived
global_defs {
}
vrrp_instance KUBERNETES {
state BACKUP
interface REPLACEMENT_INTERFACE_1
virtual_router_id 101
priority 101
advert_int 1
virtual_ipaddress {
REPLACEMENT_VIP_1
}
}
vrrp_instance INGRESS {
state BACKUP
interface REPLACEMENT_INTERFACE_2
virtual_router_id 102
priority 102
advert_int 1
virtual_ipaddress {
REPLACEMENT_VIP_2
}
}
- op: add
path: "/spec/kubeadmConfigSpec/preKubeadmCommands/-"
value:
# Please note the a list of string get appended.It is better to
# add one item at a time using op: add
systemctl enable --now keepalived
- op: add
path: "/spec/kubeadmConfigSpec/preKubeadmCommands/-"
value:
systemctl restart keepalived