Consider MGMT_CLUSTER_CA_FILE during population of SW catalog repo folder 84/15384/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 9 Sep 2025 11:47:40 +0000 (13:47 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 9 Sep 2025 12:01:46 +0000 (14:01 +0200)
Change-Id: I7615600a84310c7cfae33f64ccdd1436cb2214c7
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
installers/30-deploy-mgmt-cluster.sh

index f5697b7..a7ab608 100755 (executable)
@@ -119,6 +119,11 @@ if [ -n "${OSM_DOCKER_TAG}" ]; then
   # Replace the OSM Docker tag in the WF templates
   find "${SW_CATALOGS_REPO_DIR}/infra-configs/osm-workflows/templates/wf-templates/building-blocks" -type f -name "*.yaml" -exec sed -i "s|opensourcemano/osm-krm-functions:testing-daily|${DOCKER_REGISTRY_URL}${DOCKER_USER}/osm-krm-functions:${OSM_DOCKER_TAG}|g" {} +
 fi
+if [ -n "${MGMT_CLUSTER_CA_FILE}" ]; then
+  # Update secret-template for Flux bootstrap to add CA file
+  echo "data:" >> "${SW_CATALOGS_REPO_DIR}/cloud-resources/flux-remote-bootstrap/bootstrap/manifests/secret/secret-template.yaml"
+  echo "  ca.crt: $(base64 -w 0 "${MGMT_CLUSTER_CA_FILE}")" >> "${SW_CATALOGS_REPO_DIR}/cloud-resources/flux-remote-bootstrap/bootstrap/manifests/secret/secret-template.yaml"
+fi
 
 #####################################################################