From db3e03d9466a96d4c5c666ea96380953d618b420 Mon Sep 17 00:00:00 2001 From: karmab Date: Fri, 15 Dec 2023 19:10:16 +0100 Subject: [PATCH] openshift: dual_api_ip/dual_ingress_ip --- kvirt/cluster/openshift/kcli_default.yml | 2 ++ kvirt/cluster/openshift/keepalived.conf | 40 ++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/kvirt/cluster/openshift/kcli_default.yml b/kvirt/cluster/openshift/kcli_default.yml index 668725701..f40f8ca76 100644 --- a/kvirt/cluster/openshift/kcli_default.yml +++ b/kvirt/cluster/openshift/kcli_default.yml @@ -159,3 +159,5 @@ minimal_capability: False additional_capabilities: [] autologin: false coredns_nameserver: +dual_api_ip: +dual_ingress_ip: diff --git a/kvirt/cluster/openshift/keepalived.conf b/kvirt/cluster/openshift/keepalived.conf index a6d59572f..bdd928347 100644 --- a/kvirt/cluster/openshift/keepalived.conf +++ b/kvirt/cluster/openshift/keepalived.conf @@ -43,3 +43,43 @@ vrrp_instance {{ cluster }}.{{ domain }}_INGRESS { } } {% endif %} + +{% if dualstack and dual_api_ip != None and ':' in dual_api_ip %} +vrrp_instance {{ cluster }}.{{ domain }}_DUAL_API { + state MASTER + interface NIC + virtual_router_id {{ virtual_router_id + 2 if virtual_router_id != None else 202 }} + priority 101 + advert_int 1 + authentication { + auth_type PASS + auth_pass {{ auth_pass | default(1111) }} + } + virtual_ipaddress { + {{ dual_api_ip }}/64 + } + track_script { + chk_ocp + } +} +{% endif %} + +{% if dualstack and dual_ingress_ip != None and ':' in dual_ingress_ip %} +vrrp_instance {{ cluster }}.{{ domain }}_DUAL_INGRESS { + state MASTER + interface NIC + virtual_router_id {{ virtual_router_id + 3 if virtual_router_id != None else 202 }} + priority 101 + advert_int 1 + authentication { + auth_type PASS + auth_pass {{ auth_pass | default(1111) }} + } + virtual_ipaddress { + {{ dual_ingress_ip }}/64 + } + track_script { + chk_ocp + } +} +{% endif %}