Merge "[RIC-357] R5 - DevOps: E2M to implement K8S healthcheck"
diff --git a/helm/e2mgr/templates/deployment.yaml b/helm/e2mgr/templates/deployment.yaml
index 4719f2c..bb945f0 100644
--- a/helm/e2mgr/templates/deployment.yaml
+++ b/helm/e2mgr/templates/deployment.yaml
@@ -80,6 +80,24 @@
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:
diff --git a/helm/e2mgr/values.yaml b/helm/e2mgr/values.yaml
index c86b3bd..9597aa6 100644
--- a/helm/e2mgr/values.yaml
+++ b/helm/e2mgr/values.yaml
@@ -35,6 +35,17 @@
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.