From: Alexandre Huff Date: Sat, 1 Apr 2023 01:33:48 +0000 (-0300) Subject: Fix E2T dynamic loglevel definitions X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=0ad067633243c09b6f79d80d4bc51f56867fffa1;p=ric-plt%2Fric-dep.git Fix E2T dynamic loglevel definitions The dynamic loglevel feature was not working in E2T since ric-dep did not have definitions for loglevel in E2T charts. This change adds the required definitions to allow dynamic loglevel changes on deployment and while running E2T. Issue-ID: RIC-970 Signed-off-by: Alexandre Huff Change-Id: I047bd902e747d2c4a25b0f228f7c11801712e7a4 --- diff --git a/RECIPE_EXAMPLE/example_recipe_latest_unstable.yaml b/RECIPE_EXAMPLE/example_recipe_latest_unstable.yaml index f3f9823..4b86990 100644 --- a/RECIPE_EXAMPLE/example_recipe_latest_unstable.yaml +++ b/RECIPE_EXAMPLE/example_recipe_latest_unstable.yaml @@ -22,7 +22,7 @@ common: releasePrefix: r4 -# If a local docker registry is used, please specify it using the following option +# If a local docker registry is used, please specify it using the following option # localregistry: nexus3.o-ran-sc.org:10004 # Change the overall image pull policy using the following option @@ -113,7 +113,7 @@ e2term: image: registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" name: ric-plt-e2 - tag: 6.0.1 + tag: 6.0.2 privilegedmode: false hostnetworkmode: false env: diff --git a/RECIPE_EXAMPLE/example_recipe_latest_unstable_with_refs_to_staging.yaml b/RECIPE_EXAMPLE/example_recipe_latest_unstable_with_refs_to_staging.yaml index a79c363..c45d3b7 100644 --- a/RECIPE_EXAMPLE/example_recipe_latest_unstable_with_refs_to_staging.yaml +++ b/RECIPE_EXAMPLE/example_recipe_latest_unstable_with_refs_to_staging.yaml @@ -22,7 +22,7 @@ common: releasePrefix: r4 -# If a local docker registry is used, please specify it using the following option +# If a local docker registry is used, please specify it using the following option # localregistry: nexus3.o-ran-sc.org:10004 # Change the overall image pull policy using the following option @@ -113,7 +113,7 @@ e2term: image: registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" name: ric-plt-e2 - tag: 6.0.1 + tag: 6.0.2 privilegedmode: false hostnetworkmode: false env: diff --git a/helm/e2term/templates/configmap-loglevel.yaml b/helm/e2term/templates/configmap-loglevel.yaml new file mode 100644 index 0000000..1e4c7c6 --- /dev/null +++ b/helm/e2term/templates/configmap-loglevel.yaml @@ -0,0 +1,26 @@ +################################################################################ +# Copyright (c) 2023 Alexandre Huff Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +################################################################################ +{{- $topCtx := . }} +{{- $common_env := .Values.common_env_variables }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.configmapname.e2term" $topCtx }}-loglevel-configmap + namespace: {{ include "common.namespace.platform" $topCtx }} +data: + {{ base $common_env.ConfigMapName }}: | + log-level: {{ .Values.loglevel }} diff --git a/helm/e2term/templates/deployment.yaml b/helm/e2term/templates/deployment.yaml index 661f1ca..7a33429 100644 --- a/helm/e2term/templates/deployment.yaml +++ b/helm/e2term/templates/deployment.yaml @@ -114,6 +114,8 @@ spec: - mountPath: /tmp/rmr_verbose name: local-router-file subPath: rmr_verbose + - mountPath: {{ dir $common_env.ConfigMapName }} + name: local-loglevel-file {{ if .pizpub.enabled }} - mountPath: "{{ .env.messagecollectorfile }}" name: vol-shared @@ -195,6 +197,9 @@ spec: - name: local-router-file configMap: name: {{ include "common.configmapname.e2term" $topCtx }}-router-configmap + - name: local-loglevel-file + configMap: + name: {{ include "common.configmapname.e2term" $topCtx }}-loglevel-configmap {{ if .pizpub.enabled }} - name: localtime hostPath: diff --git a/helm/e2term/values.yaml b/helm/e2term/values.yaml index a144270..dcd69fa 100644 --- a/helm/e2term/values.yaml +++ b/helm/e2term/values.yaml @@ -26,23 +26,23 @@ e2term: name: ric-plt-e2 tag: 3.0.1 registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" - + privilegedmode: false hostnetworkmode: false - + replicaCount: 1 env: print: "1" messagecollectorfile: "/data/outgoing/" - # Service ports are now defined in + # 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 # update the _ports.tpl file with the new port number. - + dataVolSize: 100Mi storageClassName: local-storage #storageClassName: ric-storage-class - + pizpub: enabled: false # publishURL: "" @@ -70,7 +70,7 @@ health: periodSeconds: 60 enabled: true -loglevel: ERR +loglevel: 2 common_env_variables: ConfigMapName: "/etc/config/log-level"