Skip to content

Commit a45cffc

Browse files
author
Danil-Grigorev
committed
Add support for cloud-config-file flag to unpack and copy cloud-config in CCCMO
1 parent 40dd269 commit a45cffc

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

data/data/bootstrap/files/usr/local/bin/bootkube.sh.template

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,26 @@ then
245245
--entrypoint /bin/bash "${RELEASE_IMAGE_DIGEST}" \
246246
-c "cat /release-manifests/0000_26_cloud-controller-manager-operator_01_images.configmap.yaml" > manifests/ccm-images.yaml
247247

248+
ADDITIONAL_FLAGS=""
249+
if [ -f "$PWD/manifests/cloud-provider-config.yaml" ]; then
250+
ADDITIONAL_FLAGS="--cloud-config-file=/assets/manifests/cloud-provider-config.yaml"
251+
fi
252+
248253
bootkube_podman_run \
249254
--name cloud-controller-render \
250255
--volume "$PWD:/assets:z" \
251256
"${CLUSTER_CLOUD_CONTROLLER_MANAGER_OPERATOR_IMAGE}" \
252257
/render run \
253258
--images-file=/assets/manifests/ccm-images.yaml \
254259
--dest-dir=/assets/cloud-controller-manager-bootstrap \
255-
--cluster-infrastructure-file=/assets/manifests/cluster-infrastructure-02-config.yml
260+
--cluster-infrastructure-file=/assets/manifests/cluster-infrastructure-02-config.yml \
261+
${ADDITIONAL_FLAGS}
256262

257263
# Copy rendered resources to manifests folder
258-
cp cloud-controller-manager-bootstrap/manifests/* manifests/
264+
cp -r cloud-controller-manager-bootstrap/bootstrap/. bootstrap-manifests/
265+
# Copy cloud config to /etc/kubernetes/bootstrap-configs
266+
cp -r cloud-controller-manager-bootstrap/config/. /etc/kubernetes/bootstrap-configs
267+
259268

260269
touch cloud-controller-manager-bootstrap.done
261270
record_service_stage_success

0 commit comments

Comments
 (0)