treasuremap/manifests/function/k8scontrol-ha/vrrp_keepalived_patch.yaml
Manoj Alva(ma257n) e9c0a672d0 Fix for VRRP preKubeadmcommand list concatenating to a single line
The following construct in #94 fix using patchesJsonMerge
- op: add
  path:  "/spec/kubeadmConfigSpec/preKubeadmCommands/-"
  value:
      apt-get update && apt-get install -y bridge-utils keepalived ipset ipvsadm
      systemctl enable --now keepalived

This leads to the prekubeadmcommand listed as a single line.

This PS fixes this issue. Also airshipctl #10 needs all system
updates/intall to be moved to Imagebuilder.

Closes: #212
Change-Id: I624de71d2009178670291dc82bd55824ce59e18d
2021-04-21 15:26:27 +00:00

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