From: rimverma Date: Thu, 15 Jun 2023 12:39:07 +0000 (+0530) Subject: helm related changes to support dynamic logging X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;ds=inline;h=cae295e105b904822a58387865d3a0d82af3791f;p=ric-plt%2Fric-dep.git helm related changes to support dynamic logging Change-Id: I83a3a2d48be1a33ef11ad60c6ccd028586b7edff Signed-off-by: rimverma --- diff --git a/helm/e2mgr/templates/configmap.yaml b/helm/e2mgr/templates/configmap.yaml index a310608..0973eba 100644 --- a/helm/e2mgr/templates/configmap.yaml +++ b/helm/e2mgr/templates/configmap.yaml @@ -85,7 +85,7 @@ data: routingManager: {{- if hasKey .Values.e2mgr "baseUrl" }} baseUrl: {{ .Values.e2mgr.baseUrl }} - {{- else }} + {{- else}} baseUrl: "http://service-ricplt-rtmgr-http:3800/ric/v1/handles/" {{- end }} @@ -161,3 +161,14 @@ data: {{- end }} --- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.configmapname.e2mgr" . }}-loglevel-configmap + namespace: {{ include "common.namespace.platform" . }} + +data: + logcfg: "loglevel: 3" + + +--- diff --git a/helm/e2mgr/templates/deployment.yaml b/helm/e2mgr/templates/deployment.yaml index f5c9a1f..be648a5 100644 --- a/helm/e2mgr/templates/deployment.yaml +++ b/helm/e2mgr/templates/deployment.yaml @@ -16,6 +16,7 @@ ################################################################################ {{- $imagectx := dict "ctx" . "defaultregistry" .Values.e2mgr.image.registry }} {{- $pullpolicyctx := dict "ctx" . "defaultpullpolicy" .Values.e2mgr.imagePullPolicy }} +{{- $common_env := .Values.common_env_variables }} apiVersion: apps/v1 kind: Deployment metadata: @@ -53,6 +54,8 @@ spec: - mountPath: /opt/E2Manager/router.txt name: local-router-file subPath: router.txt + - mountPath: /etc/config + name: e2mgr-loglevel-volume - mountPath: /opt/E2Manager/resources/configuration.yaml name: local-configuration-file subPath: configuration.yaml @@ -97,3 +100,10 @@ spec: - name: local-configuration-file configMap: name: {{ include "common.configmapname.e2mgr" . }}-configuration-configmap + - name: e2mgr-loglevel-volume + configMap: + name: {{ include "common.configmapname.e2mgr" . }}-loglevel-configmap + items: + - key: logcfg + path: log-level.yaml + mode: 0644 diff --git a/helm/e2mgr/values.yaml b/helm/e2mgr/values.yaml index 9597aa6..af17e1d 100644 --- a/helm/e2mgr/values.yaml +++ b/helm/e2mgr/values.yaml @@ -26,7 +26,7 @@ e2mgr: name: ric-plt-e2mgr tag: 3.0.1 registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" - + privilegedmode: false replicaCount: 1 @@ -47,6 +47,10 @@ e2mgr: periodSeconds: 10 enabled: true + common_env_variables: + ServiceName: "RIC_E2_MGR" + ConfigMapName: "/etc/config/log-level.yaml" + # Service ports are now defined in # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file. # If need to change a service port, make the code change necessary, then diff --git a/helm/e2term/values.yaml b/helm/e2term/values.yaml index dcd69fa..ab2681e 100644 --- a/helm/e2term/values.yaml +++ b/helm/e2term/values.yaml @@ -70,7 +70,7 @@ health: periodSeconds: 60 enabled: true -loglevel: 2 +loglevel: 3 common_env_variables: ConfigMapName: "/etc/config/log-level"