X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=helm%2Fe2term%2Ftemplates%2Fdeployment.yaml;h=b2aae0f7b1a8d1303199a19932d9c3ad108b2fb7;hb=421b953ceefd8b39bcc11dde92cd8d91ce2c2135;hp=a58fc1b74aea95aa0e805c0b7cce37165ea30432;hpb=6c4afc33f5dc9cd95fe2129fc264af66bc219cb1;p=ric-plt%2Fric-dep.git diff --git a/helm/e2term/templates/deployment.yaml b/helm/e2term/templates/deployment.yaml index a58fc1b..b2aae0f 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 . }} @@ -28,7 +29,7 @@ metadata: name: {{ include "common.deploymentname.e2term" $topCtx }}-{{ $key }} namespace: {{ include "common.namespace.platform" $topCtx }} labels: - app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }} + app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }} chart: {{ $topCtx.Chart.Name }}-{{ $topCtx.Chart.Version | replace "+" "_" }} release: {{ $topCtx.Release.Name }} heritage: {{ $topCtx.Release.Service }} @@ -36,7 +37,7 @@ spec: replicas: {{ .replicaCount }} selector: matchLabels: - app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }} + app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }} release: {{ $topCtx.Release.Name }} template: metadata: @@ -90,7 +91,7 @@ spec: {{- end }} {{- end }} labels: - app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }} + app: {{ include "common.namespace.platform" $topCtx }}-{{ include "common.name.e2term" $topCtx }}-{{ $key }} release: {{ $topCtx.Release.Name }} spec: hostname: {{ include "common.name.e2term" $topCtx }}-{{ $key }} @@ -130,14 +131,27 @@ spec: containerPort: {{ include "common.serviceport.e2term.rmr.route" $topCtx }} - name: "rmrdata-{{ $key }}" containerPort: {{ include "common.serviceport.e2term.rmr.data" $topCtx }} - - name: "rmrsctp-{{ $key }}" + - name: "sctp-{{ $key }}" containerPort: 36422 protocol: SCTP stdin: true 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 }}