From 0a083530e50bdf3055872ee95a3e690785a19ef7 Mon Sep 17 00:00:00 2001 From: Sam Batschelet Date: Thu, 20 Feb 2020 16:41:12 -0500 Subject: [PATCH] bootkube: populate BOOTSTRAP_IP from CEO render output Signed-off-by: Sam Batschelet --- data/data/bootstrap/files/usr/local/bin/bootkube.sh.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template index a4113112f52..f2a95b8174f 100755 --- a/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template +++ b/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template @@ -113,8 +113,7 @@ bootkube_podman_run \ if [ ! -z "$CLUSTER_ETCD_OPERATOR_MANAGED" ] then # TODO: host-etcd endpoint rendered by cluster-etcd-operator - BOOTSTRAP_IP=$(hostname -I | awk '{ print $1 }') - ETCD_ENDPOINTS=https://"${BOOTSTRAP_IP}":2379 + ETCD_ENDPOINTS=https://localhost:2379 if [ ! -f etcd-bootstrap.done ] then echo "Rendering CEO Manifests..." @@ -134,6 +133,7 @@ then --config-output-file=/assets/etcd-bootstrap/config \ --cluster-config-file=/assets/manifests/cluster-network-02-config.yml + BOOTSTRAP_IP=$(grep -oP '(?<=alpha.installer.openshift.io/etcd-bootstrap: ).*' etcd-bootstrap/manifests/00_etcd-host-service-endpoints.yaml) sed -i "s/__BOOTSTRAP_IP__/${BOOTSTRAP_IP}/" /opt/openshift/manifests/etcd-host-service-endpoints.yaml cp etcd-bootstrap/manifests/* manifests/