From d14e333bf6e5eac5a96dde13c6a52d601c9233f6 Mon Sep 17 00:00:00 2001 From: "Fuss, Areli (af732p)" Date: Wed, 24 Jun 2020 19:38:17 +0300 Subject: [PATCH] [RIC-357] R5 - DevOps: E2M to implement K8S healthcheck Signed-off-by: Fuss, Areli (af732p) Change-Id: I8a65c5a4592addeea436d3f788048ecdff2dc1c4 --- helm/e2mgr/templates/deployment.yaml | 18 ++++++++++++++++++ helm/e2mgr/values.yaml | 11 +++++++++++ 2 files changed, 29 insertions(+) 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 @@ 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: 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 @@ 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. -- 2.16.6