From: Fuss, Areli (af732p) Date: Thu, 9 Jul 2020 09:18:18 +0000 (+0300) Subject: E2T: implement K8S health check X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=7a8c1ad5b7da9dcc1c03902e8e66455202c168ec;p=ric-plt%2Fric-dep.git E2T: implement K8S health check Add Readiness and Liveness definitions for e2term Issue-ID: RIC-356 Signed-off-by: Fuss, Areli (af732p) Change-Id: I32ed8fb7c654d5278a6c4821eecc5d99e4a64707 --- diff --git a/RECIPE_EXAMPLE/example_recipe.yaml b/RECIPE_EXAMPLE/example_recipe.yaml index c4c96f1..dc17a60 100644 --- a/RECIPE_EXAMPLE/example_recipe.yaml +++ b/RECIPE_EXAMPLE/example_recipe.yaml @@ -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 diff --git a/helm/e2term/templates/deployment.yaml b/helm/e2term/templates/deployment.yaml index a58fc1b..1f4e149 100644 --- a/helm/e2term/templates/deployment.yaml +++ b/helm/e2term/templates/deployment.yaml @@ -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 }} diff --git a/helm/e2term/values.yaml b/helm/e2term/values.yaml index 28be9bc..8d6674f 100644 --- a/helm/e2term/values.yaml +++ b/helm/e2term/values.yaml @@ -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