From 9726c1cb9acaaf1bf724390e621e65d5281b0af5 Mon Sep 17 00:00:00 2001 From: wahidw Date: Tue, 7 Dec 2021 12:52:17 +0000 Subject: [PATCH] Adding env variables for prometheus in E2T helmchart Signed-off-by: wahidw Change-Id: I5a9e43f81371ebb809fa1dd50066f77bc0e11b22 --- helm/e2term/templates/deployment.yaml | 18 ++++++++++++++++++ helm/e2term/values.yaml | 10 ++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/helm/e2term/templates/deployment.yaml b/helm/e2term/templates/deployment.yaml index 1a09e62..661f1ca 100644 --- a/helm/e2term/templates/deployment.yaml +++ b/helm/e2term/templates/deployment.yaml @@ -16,6 +16,7 @@ ################################################################################ {{- $topCtx := . }} {{- $health := .Values.health }} +{{- $common_env := .Values.common_env_variables }} {{- range keys .Values.e2term }} {{- $key := . }} {{- with index $topCtx.Values.e2term . }} @@ -126,6 +127,23 @@ spec: envFrom: - configMapRef: name: {{ include "common.configmapname.e2term" $topCtx }}-env-{{ $key }} + env: + - name: SYSTEM_NAME + value: "SEP" + - name: CONFIG_MAP_NAME + value: "{{ $common_env.ConfigMapName }}" + - name: HOST_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + - name: SERVICE_NAME + value: "{{ $common_env.ServiceName }}" + - name: CONTAINER_NAME + value: "{{ include "common.containername.e2term" $topCtx }}" + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name ports: - name: "rmrroute-{{ $key }}" containerPort: {{ include "common.serviceport.e2term.rmr.route" $topCtx }} diff --git a/helm/e2term/values.yaml b/helm/e2term/values.yaml index 8c793c4..a144270 100644 --- a/helm/e2term/values.yaml +++ b/helm/e2term/values.yaml @@ -59,13 +59,19 @@ e2term: health: liveness: - command: "/opt/e2/rmr_probe -h 0.0.0.0" + command: "ip=`hostname -i`;export RMR_SRC_ID=$ip;/opt/e2/rmr_probe -h $ip" initialDelaySeconds: 10 periodSeconds: 10 enabled: true readiness: - command: "/opt/e2/rmr_probe -h 0.0.0.0" + command: "ip=`hostname -i`;export RMR_SRC_ID=$ip;/opt/e2/rmr_probe -h $ip" initialDelaySeconds: 120 periodSeconds: 60 enabled: true + +loglevel: ERR + +common_env_variables: + ConfigMapName: "/etc/config/log-level" + ServiceName: "RIC_E2_TERM" -- 2.16.6