Add keepalived tracking for kube-apiserver haproxy instances
Change-Id: I9bc5dbce33aba0f0568ceff61e77f7df0f13d35b
PROD-Related: PROD-20456
diff --git a/keepalived/cluster/instance/kube_api_server_vip.yml b/keepalived/cluster/instance/kube_api_server_vip.yml
new file mode 100644
index 0000000..7e03d25
--- /dev/null
+++ b/keepalived/cluster/instance/kube_api_server_vip.yml
@@ -0,0 +1,25 @@
+applications:
+- keepalived
+classes:
+- service.keepalived.support
+parameters:
+ _param:
+ keepalived_vip_priority: 101
+ keepalived_kube_apiserver_vrrp_script_content: "pidof haproxy && systemctl status kube-apiserver.service --quiet --no-pager"
+ keepalived:
+ cluster:
+ vrrp_scripts:
+ k8s_vip:
+ content: ${_param:keepalived_kube_apiserver_vrrp_script_content}
+ interval: 10
+ rise: 1
+ fall: 1
+ enabled: true
+ instance:
+ kube_apiserver_vip:
+ address: ${_param:keepalived_k8s_apiserver_vip_address}
+ password: ${_param:keepalived_k8s_apiserver_vip_password}
+ interface: ${_param:keepalived_k8s_apiserver_vip_interface}
+ virtual_router_id: 60
+ priority: ${_param:keepalived_vip_priority}
+ track_script: k8s_vip
\ No newline at end of file