Merge "RMR Message Type configurable and added liveness/readiness check for rtmgr"
authorLusheng Ji <lji@research.att.com>
Mon, 6 Jul 2020 16:21:25 +0000 (16:21 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Mon, 6 Jul 2020 16:21:25 +0000 (16:21 +0000)
helm/e2mgr/templates/deployment.yaml
helm/e2mgr/values.yaml

index 4719f2c..a4fafa5 100644 (file)
@@ -52,7 +52,7 @@ spec:
           - "/bin/sh"
           args:
           - '-c'
-          - "redis-cli -h {{ include "common.servicename.dbaas.tcp" . }} -p {{ include "common.serviceport.dbaas.redis" . }} SETNX \"{e2Manager},GENERAL\" \"{\"enableRic\":true}\""
+          - "redis-cli -h {{ include "common.servicename.dbaas.tcp" . }} -p {{ include "common.serviceport.dbaas.redis" . }} SETNX \"{e2Manager},GENERAL\" \"{\\\"enableRic\\\":true}\""
       containers:
         - name: {{ include "common.containername.e2mgr" . }}
           image: {{ include "common.dockerregistry.url" $imagectx }}/{{ .Values.e2mgr.image.name }}:{{ .Values.e2mgr.image.tag }}
@@ -80,6 +80,24 @@ spec:
           tty: true
           securityContext:
             privileged: {{ .Values.e2mgr.privilegedmode}}
+
+          {{- if eq .Values.e2mgr.liveness.enabled true }}
+          livenessProbe:
+            httpGet:
+              path: {{ .Values.e2mgr.liveness.api }}
+              port: {{ include "common.serviceport.e2mgr.http" . }}
+            initialDelaySeconds: {{ .Values.e2mgr.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.e2mgr.liveness.periodSeconds }}
+          {{- end }}
+          {{- if eq .Values.e2mgr.readiness.enabled true }}
+          readinessProbe:
+            httpGet:
+              path: {{ .Values.e2mgr.readiness.api }}
+              port: {{ include "common.serviceport.e2mgr.http" . }}
+            initialDelaySeconds: {{ .Values.e2mgr.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.e2mgr.liveness.periodSeconds }}
+          {{- end }}
+
       volumes:
         - name: local-router-file
           configMap:
index c86b3bd..9597aa6 100644 (file)
@@ -35,6 +35,17 @@ e2mgr:
     plmnId: 131014
     ricNearRtId: 556670
 
+  liveness:
+    api: v1/health
+    initialDelaySeconds: 3
+    periodSeconds: 10
+    enabled: true
+
+  readiness:
+    api: v1/health
+    initialDelaySeconds: 3
+    periodSeconds: 10
+    enabled: true
 
   # Service ports are now defined in 
   # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file.