[RIC-357] R5 - DevOps: E2M to implement K8S healthcheck 27/4227/1
authorFuss, Areli (af732p) <areli.fuss@intl.att.com>
Wed, 24 Jun 2020 16:38:17 +0000 (19:38 +0300)
committerFuss, Areli (af732p) <areli.fuss@intl.att.com>
Wed, 24 Jun 2020 16:38:17 +0000 (19:38 +0300)
Signed-off-by: Fuss, Areli (af732p) <areli.fuss@intl.att.com>
Change-Id: I8a65c5a4592addeea436d3f788048ecdff2dc1c4

helm/e2mgr/templates/deployment.yaml
helm/e2mgr/values.yaml

index 4719f2c..bb945f0 100644 (file)
@@ -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.