From ccded05ad5fa635bff97b09f0ddd3e8f496fffee Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Tue, 6 Aug 2019 12:59:32 -0400 Subject: [PATCH] baremetal: keepalived to pass cluster-config.yml to runtimecfg 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. Fixes #1037 Depends on openshift/baremetal-runtimecfg#16 --- manifests/baremetal/keepalived.yaml | 7 +++++++ pkg/operator/assets/bindata.go | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/manifests/baremetal/keepalived.yaml b/manifests/baremetal/keepalived.yaml index 23ea907a85..5b92d7cffa 100644 --- a/manifests/baremetal/keepalived.yaml +++ b/manifests/baremetal/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 656e6ab077..80624c6bd9 100644 --- a/pkg/operator/assets/bindata.go +++ b/pkg/operator/assets/bindata.go @@ -299,6 +299,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 }} @@ -315,6 +318,8 @@ spec: - "/config" - "--out-dir" - "/etc/keepalived" + - "--cluster-config" + - "/opt/openshift/manifests/cluster-config.yaml" resources: {} volumeMounts: - name: resource-dir @@ -323,6 +328,8 @@ spec: mountPath: "/etc/kubernetes/kubeconfig" - name: conf-dir mountPath: "/etc/keepalived" + - name: manifests + mountPath: "/opt/openshift/manifests" imagePullPolicy: IfNotPresent containers: - name: keepalived