E2T: implement K8S health check 57/4357/1
authorFuss, Areli (af732p) <areli.fuss@intl.att.com>
Thu, 9 Jul 2020 09:18:18 +0000 (12:18 +0300)
committerFuss, Areli (af732p) <areli.fuss@intl.att.com>
Thu, 9 Jul 2020 09:18:18 +0000 (12:18 +0300)
Add Readiness and Liveness definitions for e2term

Issue-ID: RIC-356
Signed-off-by: Fuss, Areli (af732p) <areli.fuss@intl.att.com>
Change-Id: I32ed8fb7c654d5278a6c4821eecc5d99e4a64707

RECIPE_EXAMPLE/example_recipe.yaml
helm/e2term/templates/deployment.yaml
helm/e2term/values.yaml

index c4c96f1..dc17a60 100644 (file)
@@ -96,7 +96,7 @@ e2mgr:
   image:
     registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
     name: ric-plt-e2mgr
-    tag: 5.2.4
+    tag: 5.2.5
   privilegedmode: false
   globalRicId:
     ricId: "AACCE"
@@ -109,7 +109,7 @@ e2term:
     image:
       registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
       name: ric-plt-e2
-      tag: 4.4.1
+      tag: 5.0.7
   
     privilegedmode: false
     hostnetworkmode: false
index a58fc1b..1f4e149 100644 (file)
@@ -15,6 +15,7 @@
 #   limitations under the License.                                             #
 ################################################################################
 {{- $topCtx :=  . }}
+{{- $health := .Values.health }}
 {{- range keys .Values.e2term }}
 {{- $key := . }}
 {{- with index $topCtx.Values.e2term . }}
@@ -137,7 +138,20 @@ spec:
           tty: true
           securityContext:
             privileged: {{ .privilegedmode }}
-
+          {{- if eq $health.liveness.enabled true }}
+          readinessProbe:
+            exec:
+              command: [ "/bin/sh", "-c", "{{ $health.readiness.command }}:{{ include "common.serviceport.e2term.rmr.data" . }}" ]
+            initialDelaySeconds: {{ $health.readiness.initialDelaySeconds }}
+            periodSeconds: {{ $health.readiness.periodSeconds }}
+          {{- end }}
+          {{- if eq $health.liveness.enabled true }}
+          livenessProbe:
+            exec:
+              command: [ "/bin/sh", "-c", "{{ $health.liveness.command }}:{{ include "common.serviceport.e2term.rmr.data" . }}" ]
+            initialDelaySeconds: {{ $health.liveness.initialDelaySeconds }}
+            periodSeconds: {{ $health.liveness.periodSeconds }}
+          {{- end }}
 {{ if .pizpub.enabled }}
         - name: {{ include "common.containername.e2term" $topCtx }}-pizpub
           {{- $pizpubimagectx := dict "ctx" $topCtx "defaultregistry" .pizpub.image.registry }}
index 28be9bc..8d6674f 100644 (file)
@@ -56,3 +56,16 @@ e2term:
     #    name: ""
     #    tag: ""
     #    registry: ""
+
+health:
+    liveness:
+      command: "/opt/e2/rmr_probe -h 0.0.0.0"
+      initialDelaySeconds: 10
+      periodSeconds: 10
+      enabled: true
+
+    readiness:
+      command: "/opt/e2/rmr_probe -h 0.0.0.0"
+      initialDelaySeconds: 15
+      periodSeconds: 10
+      enabled: true