diff --git a/manifests/openstack/coredns.yaml b/manifests/openstack/coredns.yaml index 5ba51f77ce..3cb7874d12 100644 --- a/manifests/openstack/coredns.yaml +++ b/manifests/openstack/coredns.yaml @@ -30,8 +30,6 @@ spec: - "/etc/kubernetes/kubeconfig" - "--api-vip" - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.NodeDNSIP }}" - "--ingress-vip" - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.IngressIP }}" - "/config" diff --git a/manifests/openstack/keepalived.yaml b/manifests/openstack/keepalived.yaml index 406e0830ca..6324012303 100644 --- a/manifests/openstack/keepalived.yaml +++ b/manifests/openstack/keepalived.yaml @@ -30,8 +30,6 @@ spec: - "/etc/kubernetes/kubeconfig" - "--api-vip" - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.NodeDNSIP }}" - "--ingress-vip" - "{{ .ControllerConfig.Infra.Status.PlatformStatus.OpenStack.IngressIP }}" - "/config" diff --git a/templates/common/baremetal/files/baremetal-coredns.yaml b/templates/common/baremetal/files/baremetal-coredns.yaml index a506d18794..e2c5cc4e74 100644 --- a/templates/common/baremetal/files/baremetal-coredns.yaml +++ b/templates/common/baremetal/files/baremetal-coredns.yaml @@ -35,8 +35,6 @@ contents: - "/etc/kubernetes/kubeconfig" - "--api-vip" - "{{ .Infra.Status.PlatformStatus.BareMetal.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .Infra.Status.PlatformStatus.BareMetal.NodeDNSIP }}" - "--ingress-vip" - "{{ .Infra.Status.PlatformStatus.BareMetal.IngressIP }}" - "/config" @@ -98,8 +96,6 @@ contents: - "/etc/coredns/Corefile" - "--api-vip" - "{{ .Infra.Status.PlatformStatus.BareMetal.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .Infra.Status.PlatformStatus.BareMetal.NodeDNSIP }}" - "--ingress-vip" - "{{ .Infra.Status.PlatformStatus.BareMetal.IngressIP }}" resources: diff --git a/templates/common/baremetal/files/baremetal-keepalived.yaml b/templates/common/baremetal/files/baremetal-keepalived.yaml index cac5ba9f6e..4599ab3831 100644 --- a/templates/common/baremetal/files/baremetal-keepalived.yaml +++ b/templates/common/baremetal/files/baremetal-keepalived.yaml @@ -97,8 +97,6 @@ contents: - "/etc/keepalived/keepalived.conf" - "--api-vip" - "{{ .Infra.Status.PlatformStatus.BareMetal.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .Infra.Status.PlatformStatus.BareMetal.NodeDNSIP }}" - "--ingress-vip" - "{{ .Infra.Status.PlatformStatus.BareMetal.IngressIP }}" resources: diff --git a/templates/common/baremetal/files/baremetal-mdns-publisher.yaml b/templates/common/baremetal/files/baremetal-mdns-publisher.yaml index 09752570a5..c529b7f060 100644 --- a/templates/common/baremetal/files/baremetal-mdns-publisher.yaml +++ b/templates/common/baremetal/files/baremetal-mdns-publisher.yaml @@ -62,8 +62,6 @@ contents: - "/etc/kubernetes/kubeconfig" - "--api-vip" - "{{ .Infra.Status.PlatformStatus.BareMetal.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .Infra.Status.PlatformStatus.BareMetal.NodeDNSIP }}" - "--ingress-vip" - "{{ .Infra.Status.PlatformStatus.BareMetal.IngressIP }}" - "/config" diff --git a/templates/master/00-master/openstack/files/NetworkManager-resolv-prepender.yaml b/templates/master/00-master/openstack/files/NetworkManager-resolv-prepender.yaml index a83ab14017..ff880d84a1 100644 --- a/templates/master/00-master/openstack/files/NetworkManager-resolv-prepender.yaml +++ b/templates/master/00-master/openstack/files/NetworkManager-resolv-prepender.yaml @@ -9,7 +9,9 @@ contents: case "$STATUS" in up|down|dhcp4-change|dhcp6-change) logger -s "NM resolv-prepender triggered by ${1} ${2}." - NAMESERVER_IP="{{.Infra.Status.PlatformStatus.OpenStack.NodeDNSIP}}" + NAMESERVER_IP=$(/usr/local/bin/non_virtual_ip \ + "{{.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP}}" \ + "{{.Infra.Status.PlatformStatus.OpenStack.IngressIP}}") DOMAIN="{{.EtcdDiscoveryDomain}}" set +e if [[ -n "$NAMESERVER_IP" ]]; then diff --git a/templates/master/00-master/openstack/files/openstack-keepalived-keepalived.yaml b/templates/master/00-master/openstack/files/openstack-keepalived-keepalived.yaml index 8729439ada..54ef962682 100644 --- a/templates/master/00-master/openstack/files/openstack-keepalived-keepalived.yaml +++ b/templates/master/00-master/openstack/files/openstack-keepalived-keepalived.yaml @@ -8,11 +8,7 @@ contents: interval 1 weight 50 } - vrrp_script chk_dns { - script "/usr/bin/host -t SRV _etcd-server-ssl._tcp.{{ .EtcdDiscoveryDomain }} localhost" - interval 1 - weight 50 - } + # TODO: Improve this check. The port is assumed to be alive. # Need to assess what is the ramification if the port is not there. vrrp_script chk_ingress { @@ -37,23 +33,7 @@ contents: chk_ocp } } - vrrp_instance {{`{{ .Cluster.Name }}`}}_DNS { - state BACKUP - interface {{`{{ .VRRPInterface }}`}} - virtual_router_id {{`{{ .Cluster.DNSVirtualRouterID }}`}} - priority 40 - advert_int 1 - authentication { - auth_type PASS - auth_pass {{`{{ .Cluster.Name }}`}}_dns_vip - } - virtual_ipaddress { - {{`{{ .Cluster.DNSVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}} - } - track_script { - chk_dns - } - } + vrrp_instance {{`{{ .Cluster.Name }}`}}_INGRESS { state BACKUP interface {{`{{ .VRRPInterface }}`}} diff --git a/templates/worker/00-worker/openstack/files/NetworkManager-resolv-prepender.yaml b/templates/worker/00-worker/openstack/files/NetworkManager-resolv-prepender.yaml index f303a3158c..9b9996cb76 100644 --- a/templates/worker/00-worker/openstack/files/NetworkManager-resolv-prepender.yaml +++ b/templates/worker/00-worker/openstack/files/NetworkManager-resolv-prepender.yaml @@ -11,7 +11,6 @@ contents: logger -s "NM resolv-prepender triggered by ${1} ${2}." NAMESERVER_IP=$(/usr/local/bin/non_virtual_ip \ "{{.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP}}" \ - "{{.Infra.Status.PlatformStatus.OpenStack.NodeDNSIP}}" \ "{{.Infra.Status.PlatformStatus.OpenStack.IngressIP}}") DOMAIN="{{.EtcdDiscoveryDomain}}" set +e