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.conf.tmpl b/manifests/openstack/keepalived.conf.tmpl index 7ae696c17d..5d2ec43b42 100644 --- a/manifests/openstack/keepalived.conf.tmpl +++ b/manifests/openstack/keepalived.conf.tmpl @@ -18,18 +18,3 @@ vrrp_instance {{`{{.Cluster.Name}}`}}_API { {{`{{ .Cluster.APIVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}} } } - -vrrp_instance {{`{{.Cluster.Name}}`}}_DNS { - state MASTER - interface {{`{{.VRRPInterface}}`}} - virtual_router_id {{`{{.Cluster.DNSVirtualRouterID }}`}} - priority 140 - advert_int 1 - authentication { - auth_type PASS - auth_pass {{`{{.Cluster.Name}}`}}_dns_vip - } - virtual_ipaddress { - {{`{{ .Cluster.DNSVIP }}`}}/{{`{{ .Cluster.VIPNetmask }}`}} - } -} 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/pkg/operator/assets/bindata.go b/pkg/operator/assets/bindata.go index d4a0bf9a4e..2ca2c68d9a 100644 --- a/pkg/operator/assets/bindata.go +++ b/pkg/operator/assets/bindata.go @@ -1805,8 +1805,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" @@ -1902,21 +1900,6 @@ vrrp_instance {{`+"`"+`{{.Cluster.Name}}`+"`"+`}}_API { {{`+"`"+`{{ .Cluster.APIVIP }}`+"`"+`}}/{{`+"`"+`{{ .Cluster.VIPNetmask }}`+"`"+`}} } } - -vrrp_instance {{`+"`"+`{{.Cluster.Name}}`+"`"+`}}_DNS { - state MASTER - interface {{`+"`"+`{{.VRRPInterface}}`+"`"+`}} - virtual_router_id {{`+"`"+`{{.Cluster.DNSVirtualRouterID }}`+"`"+`}} - priority 140 - advert_int 1 - authentication { - auth_type PASS - auth_pass {{`+"`"+`{{.Cluster.Name}}`+"`"+`}}_dns_vip - } - virtual_ipaddress { - {{`+"`"+`{{ .Cluster.DNSVIP }}`+"`"+`}}/{{`+"`"+`{{ .Cluster.VIPNetmask }}`+"`"+`}} - } -} `) func manifestsOpenstackKeepalivedConfTmplBytes() ([]byte, error) { @@ -1966,8 +1949,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/openstack/files/openstack-coredns.yaml b/templates/common/openstack/files/openstack-coredns.yaml index 066cde6a3a..d52ef583a7 100644 --- a/templates/common/openstack/files/openstack-coredns.yaml +++ b/templates/common/openstack/files/openstack-coredns.yaml @@ -32,8 +32,6 @@ contents: - "/etc/kubernetes/kubeconfig" - "--api-vip" - "{{ .Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .Infra.Status.PlatformStatus.OpenStack.NodeDNSIP }}" - "--ingress-vip" - "{{ .Infra.Status.PlatformStatus.OpenStack.IngressIP }}" - "/config" @@ -88,4 +86,4 @@ contents: tolerations: - operator: Exists priorityClassName: system-node-critical - status: {} \ No newline at end of file + status: {} diff --git a/templates/common/openstack/files/openstack-keepalived.yaml b/templates/common/openstack/files/openstack-keepalived.yaml index a02a98a283..3b39607751 100644 --- a/templates/common/openstack/files/openstack-keepalived.yaml +++ b/templates/common/openstack/files/openstack-keepalived.yaml @@ -32,8 +32,6 @@ contents: - "/etc/kubernetes/kubeconfig" - "--api-vip" - "{{ .Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .Infra.Status.PlatformStatus.OpenStack.NodeDNSIP }}" - "--ingress-vip" - "{{ .Infra.Status.PlatformStatus.OpenStack.IngressIP }}" - "/config" @@ -84,4 +82,4 @@ contents: tolerations: - operator: Exists priorityClassName: system-node-critical - status: {} \ No newline at end of file + status: {} diff --git a/templates/common/openstack/files/openstack-mdns-publisher.yaml b/templates/common/openstack/files/openstack-mdns-publisher.yaml index b3981d763a..c4a89eca90 100644 --- a/templates/common/openstack/files/openstack-mdns-publisher.yaml +++ b/templates/common/openstack/files/openstack-mdns-publisher.yaml @@ -64,8 +64,6 @@ contents: - "/etc/kubernetes/kubeconfig" - "--api-vip" - "{{ .Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP }}" - - "--dns-vip" - - "{{ .Infra.Status.PlatformStatus.OpenStack.NodeDNSIP }}" - "--ingress-vip" - "{{ .Infra.Status.PlatformStatus.OpenStack.IngressIP }}" - "/config" @@ -104,4 +102,4 @@ contents: tolerations: - operator: Exists priorityClassName: system-node-critical - status: {} \ No newline at end of file + status: {} 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 58654faf19..662c29928e 100644 --- a/templates/master/00-master/openstack/files/NetworkManager-resolv-prepender.yaml +++ b/templates/master/00-master/openstack/files/NetworkManager-resolv-prepender.yaml @@ -14,7 +14,14 @@ contents: # Ensure resolv.conf exists before we try to run podman cp /var/run/NetworkManager/resolv.conf /etc/resolv.conf - NAMESERVER_IP="{{.Infra.Status.PlatformStatus.OpenStack.NodeDNSIP}}" + NAMESERVER_IP=$(/usr/bin/podman run --rm \ + --authfile /var/lib/kubelet/config.json \ + --net=host \ + {{ .Images.baremetalRuntimeCfgImage }} \ + node-ip \ + show \ + "{{.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP}}" \ + "{{.Infra.Status.PlatformStatus.OpenStack.IngressIP}}") DOMAIN="{{.EtcdDiscoveryDomain}}" if [[ -n "$NAMESERVER_IP" ]]; then logger -s "NM resolv-prepender: Prepending 'nameserver $NAMESERVER_IP' to /etc/resolv.conf (other nameservers from /var/run/NetworkManager/resolv.conf)" 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 7b72e65912..bada449b5c 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 { @@ -20,6 +16,7 @@ contents: interval 1 weight 50 } + vrrp_instance {{`{{ .Cluster.Name }}`}}_API { state BACKUP interface {{`{{ .VRRPInterface }}`}} @@ -37,23 +34,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 51c7f1e0c4..cf5a5a0ae6 100644 --- a/templates/worker/00-worker/openstack/files/NetworkManager-resolv-prepender.yaml +++ b/templates/worker/00-worker/openstack/files/NetworkManager-resolv-prepender.yaml @@ -16,7 +16,6 @@ contents: node-ip \ show \ "{{.Infra.Status.PlatformStatus.OpenStack.APIServerInternalIP}}" \ - "{{.Infra.Status.PlatformStatus.OpenStack.NodeDNSIP}}" \ "{{.Infra.Status.PlatformStatus.OpenStack.IngressIP}}") DOMAIN="{{.EtcdDiscoveryDomain}}" if [[ -n "$NAMESERVER_IP" ]]; then