Skip to content

Commit

Permalink
Add support for cloud-config-file flag to unpack and copy cloud-confi…
Browse files Browse the repository at this point in the history
…g in CCCMO
  • Loading branch information
Danil-Grigorev committed Jun 8, 2021
1 parent 40dd269 commit 233896e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 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 @@ -245,17 +245,26 @@ then
--entrypoint /bin/bash "${RELEASE_IMAGE_DIGEST}" \
-c "cat /release-manifests/0000_26_cloud-controller-manager-operator_01_images.configmap.yaml" > manifests/ccm-images.yaml

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

bootkube_podman_run \
--name cloud-controller-render \
--volume "$PWD:/assets:z" \
"${CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE}" \
/render run \
--images-file=/assets/manifests/ccm-images.yaml \
--dest-dir=/assets/cloud-controller-manager-bootstrap \
--cluster-infrastructure-file=/assets/manifests/cluster-infrastructure-02-config.yml
--cluster-infrastructure-file=/assets/manifests/cluster-infrastructure-02-config.yml \
${ADDITIONAL_FLAGS}

# Copy rendered resources to manifests folder
cp cloud-controller-manager-bootstrap/manifests/* manifests/
cp cloud-controller-manager-bootstrap/bootstrap/* bootstrap-manifests/
# Copy cloud config to /etc/kubernetes/bootstrap-configs
cp cloud-controller-manager-bootstrap/config/* /etc/kubernetes/bootstrap-configs


touch cloud-controller-manager-bootstrap.done
record_service_stage_success
Expand Down

0 comments on commit 233896e

Please sign in to comment.