Skip to content

Commit

Permalink
bootkube.sh: update cluster-config-operator to generate bootstrap con…
Browse files Browse the repository at this point in the history
…figmap
  • Loading branch information
jhixson74 committed Jul 31, 2020
1 parent b1f19ae commit 3c0b9bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 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 @@ -158,13 +158,21 @@ then

rm --recursive --force config-bootstrap

ADDITIONAL_FLAGS=""
if [ -f "$PWD/manifests/cloud-provider-config.yaml" ]; then
ADDITIONAL_FLAGS="--cloud-provider-config-input-file=/assets/manifests/cloud-provider-config.yaml"
fi

bootkube_podman_run \
--volume "$PWD:/assets:z" \
"${CONFIG_OPERATOR_IMAGE}" \
/usr/bin/cluster-config-operator render \
--cluster-infrastructure-input-file=/assets/manifests/cluster-infrastructure-02-config.yml \
--cloud-provider-config-output-file=/assets/config-bootstrap/cloud-provider-config-generated.yaml \
--config-output-file=/assets/config-bootstrap/config \
--asset-input-dir=/assets/tls \
--asset-output-dir=/assets/config-bootstrap
--asset-output-dir=/assets/config-bootstrap \
${ADDITIONAL_FLAGS}

cp config-bootstrap/manifests/* manifests/

Expand Down Expand Up @@ -270,6 +278,9 @@ then
if [ -f "/opt/openshift/tls/cloud-ca-cert.pem" ]; then
ADDITIONAL_FLAGS="--cloud-provider-ca-file=/assets/tls/cloud-ca-cert.pem"
fi
if [ -f "$PWD/manifests/cloud-provider-config.yaml" ]; then
ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} --cloud-config-file=/assets/config-bootstrap/cloud-provider-config-generated.yaml"
fi

bootkube_podman_run \
--user 0 \
Expand All @@ -293,7 +304,6 @@ then
--mdns-publisher-image="${MDNS_PUBLISHER_IMAGE}" \
--haproxy-image="${HAPROXY_IMAGE}" \
--baremetal-runtimecfg-image="${BAREMETAL_RUNTIMECFG_IMAGE}" \
--cloud-config-file=/assets/manifests/cloud-provider-config.yaml \
--cluster-etcd-operator-image="${CLUSTER_ETCD_OPERATOR_IMAGE}" \
--release-image="${RELEASE_IMAGE_DIGEST}" \
${ADDITIONAL_FLAGS}
Expand Down
2 changes: 1 addition & 1 deletion pkg/asset/manifests/cloudproviderconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
)

const (
cloudProviderConfigDataKey = "config"
cloudProviderConfigDataKey = "cloud.conf"
)

// CloudProviderConfig generates the cloud-provider-config.yaml files.
Expand Down

0 comments on commit 3c0b9bc

Please sign in to comment.