Skip to content

Commit

Permalink
bootkube: populate BOOTSTRAP_IP from CEO render output
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
  • Loading branch information
hexfusion committed Feb 20, 2020
1 parent 2af1225 commit 0a08353
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/data/bootstrap/files/usr/local/bin/bootkube.sh.template
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand All @@ -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/
Expand Down

0 comments on commit 0a08353

Please sign in to comment.