Add user-values to OSM installation in 40-deploy-osm.sh 43/15543/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 25 Nov 2025 15:59:01 +0000 (16:59 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 25 Nov 2025 15:59:09 +0000 (16:59 +0100)
Change-Id: I330b0462434d3e2526f0a44ed513d44397141065
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
installers/40-deploy-osm.sh

index b1c5968..5c0e847 100755 (executable)
@@ -141,9 +141,11 @@ if [ -n "${MODULES_FOR_TESTING}" ]; then
     done
 fi
 
-echo "helm upgrade --install -n $OSM_NAMESPACE --create-namespace $OSM_HELM_RELEASE ${HERE}/helm/osm --values ${HERE}/helm/osm/values.yaml ${OSM_HELM_OPTS}"
-helm upgrade --install -n $OSM_NAMESPACE --create-namespace $OSM_HELM_RELEASE ${HERE}/helm/osm --values ${HERE}/helm/osm/values.yaml ${OSM_HELM_OPTS}
-# Override existing values.yaml with the final values.yaml used to install OSM
+[ ! -f "${OSM_HOME_DIR}/user-values.yaml" ] || OSM_HELM_OPTS="${OSM_HELM_OPTS} --values ${OSM_HOME_DIR}/user-values.yaml"
+
+echo "helm upgrade --install -n $OSM_NAMESPACE --create-namespace $OSM_HELM_RELEASE ${HERE}/helm/osm ${OSM_HELM_OPTS}"
+helm upgrade --install -n $OSM_NAMESPACE --create-namespace $OSM_HELM_RELEASE ${HERE}/helm/osm ${OSM_HELM_OPTS}
+# Export final values.yaml used to install OSM to a file for future reference
 helm -n $OSM_NAMESPACE get values $OSM_HELM_RELEASE | sudo tee -a ${OSM_HELM_WORK_DIR}/osm-values.yaml
 
 # Check OSM health state