Update OSM helm chart to support installation behind HTTP proxy 82/13482/4
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 31 May 2023 21:47:01 +0000 (23:47 +0200)
committerbeierlm <mark.beierl@canonical.com>
Thu, 22 Jun 2023 13:44:59 +0000 (15:44 +0200)
Change-Id: Ibd50b4fddcb205130935ab38369144637b68b5a6
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
installers/full_install_osm.sh
installers/helm/osm/templates/lcm/lcm-configmap.yaml

index 8f092fb..f110b9a 100755 (executable)
@@ -322,6 +322,12 @@ EOF"
     [ -n "$OSM_VCA_APIPROXY" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set lcm.config.OSMLCM_VCA_APIPROXY=${OSM_VCA_APIPROXY}"
     [ ! "$OSM_DOCKER_TAG" == "13" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.image.tag=${OSM_DOCKER_TAG}"
     [ -n "${INSTALL_NGSA}" ] || OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.oldServiceAssurance=true"
+    if [ -n "${OSM_BEHIND_PROXY}" ]; then
+        OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.behindHttpProxy=true"
+        [ -n "${HTTP_PROXY}" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.httpProxy.HTTP_PROXY=${HTTP_PROXY}"
+        [ -n "${HTTPS_PROXY}" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.httpProxy.HTTPS_PROXY=${HTTPS_PROXY}"
+        [ -n "${NO_PROXY}" ] && OSM_HELM_OPTS="${OSM_HELM_OPTS} --set global.httpProxy.NO_PROXY=${NO_PROXY}"
+    fi
 
     echo "helm -n $OSM_NAMESPACE install $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm -f ${OSM_HELM_WORK_DIR}/osm-values.yaml ${OSM_HELM_OPTS}"
     helm -n $OSM_NAMESPACE install $OSM_NAMESPACE $OSM_DEVOPS/installers/helm/osm -f ${OSM_HELM_WORK_DIR}/osm-values.yaml ${OSM_HELM_OPTS}
index c976a70..9fdfcc8 100644 (file)
@@ -30,6 +30,11 @@ data:
   OSMLCM_STORAGE_COLLECTION: "files"
   OSMLCM_STORAGE_URI: "mongodb://mongodb-k8s:27017/?replicaSet=rs0"
   OSMLCM_GLOBAL_LOGLEVEL: {{ .Values.lcm.logLevel | default .Values.global.logLevel | default "INFO" }}
+{{- if .Values.global.behindHttpProxy -}}
+{{- with .Values.global.httpProxy }}
+  {{- . | toYaml | nindent 2 }}
+{{- end }}
+{{- end }}
 {{- with .Values.lcm.config }}
   {{- . | toYaml | nindent 2 }}
 {{- end }}