From 555702ac176faeb147690be699957e80c3c206a9 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Wed, 31 May 2023 23:47:01 +0200 Subject: [PATCH] Update OSM helm chart to support installation behind HTTP proxy Change-Id: Ibd50b4fddcb205130935ab38369144637b68b5a6 Signed-off-by: garciadeblas --- installers/full_install_osm.sh | 6 ++++++ installers/helm/osm/templates/lcm/lcm-configmap.yaml | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 8f092fb8..f110b9ac 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -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} diff --git a/installers/helm/osm/templates/lcm/lcm-configmap.yaml b/installers/helm/osm/templates/lcm/lcm-configmap.yaml index c976a701..9fdfcc8e 100644 --- a/installers/helm/osm/templates/lcm/lcm-configmap.yaml +++ b/installers/helm/osm/templates/lcm/lcm-configmap.yaml @@ -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 }} -- 2.25.1