From 0f45006ff50dd06f2819ba5e138753908c95fac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Andr=C3=A9?= Date: Thu, 8 Aug 2019 13:14:15 +0200 Subject: [PATCH] openstack: keepalived to pass cluster-config.yml to runtimecfg This pulls in fix https://github.com/openshift/machine-config-operator/pull/1043 for openstack. A recent installer change started using a loopback address in kubeconfig as the default on the bootstrap node. baremetal-runtimecfg will begin using cluster-config.yml if it exists first, in order to get the domain and name of the cluster. This patch adds a flag for this to the keepalived bootstrap pod in order to utilize it. This should only affect the bootstrap pods. --- manifests/openstack/keepalived.yaml | 7 +++++++ pkg/operator/assets/bindata.go | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/manifests/openstack/keepalived.yaml b/manifests/openstack/keepalived.yaml index 281ef32e3b..8e3cd28162 100644 --- a/manifests/openstack/keepalived.yaml +++ b/manifests/openstack/keepalived.yaml @@ -18,6 +18,9 @@ spec: path: "/etc/kubernetes/kubeconfig" - name: conf-dir empty-dir: {} + - name: manifests + hostPath: + path: "/opt/openshift/manifests" initContainers: - name: render-config image: {{ .Images.BaremetalRuntimeCfgBootstrap }} @@ -34,6 +37,8 @@ spec: - "/config" - "--out-dir" - "/etc/keepalived" + - "--cluster-config" + - "/opt/openshift/manifests/cluster-config.yaml" resources: {} volumeMounts: - name: resource-dir @@ -42,6 +47,8 @@ spec: mountPath: "/etc/kubernetes/kubeconfig" - name: conf-dir mountPath: "/etc/keepalived" + - name: manifests + mountPath: "/opt/openshift/manifests" imagePullPolicy: IfNotPresent containers: - name: keepalived diff --git a/pkg/operator/assets/bindata.go b/pkg/operator/assets/bindata.go index 80624c6bd9..0d9e57af1c 100644 --- a/pkg/operator/assets/bindata.go +++ b/pkg/operator/assets/bindata.go @@ -1822,6 +1822,9 @@ spec: path: "/etc/kubernetes/kubeconfig" - name: conf-dir empty-dir: {} + - name: manifests + hostPath: + path: "/opt/openshift/manifests" initContainers: - name: render-config image: {{ .Images.BaremetalRuntimeCfgBootstrap }} @@ -1838,6 +1841,8 @@ spec: - "/config" - "--out-dir" - "/etc/keepalived" + - "--cluster-config" + - "/opt/openshift/manifests/cluster-config.yaml" resources: {} volumeMounts: - name: resource-dir @@ -1846,6 +1851,8 @@ spec: mountPath: "/etc/kubernetes/kubeconfig" - name: conf-dir mountPath: "/etc/keepalived" + - name: manifests + mountPath: "/opt/openshift/manifests" imagePullPolicy: IfNotPresent containers: - name: keepalived