[POLICY] Correct container ports in Nexus and GUI 09/135509/2
authorAndreas Geissler <andreas-geissler@telekom.de>
Wed, 19 Jul 2023 12:48:39 +0000 (14:48 +0200)
committerAndreas Geissler <andreas-geissler@telekom.de>
Wed, 19 Jul 2023 16:20:45 +0000 (18:20 +0200)
Use templates in deployment.yaml to fix container port settings

Issue-ID: OOM-3231

Change-Id: I4802ad318ec87fd55980483caa86a1ab7f018693
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
kubernetes/policy/components/policy-gui/templates/deployment.yaml
kubernetes/policy/components/policy-nexus/templates/deployment.yaml

index 7a573d0..69b5e37 100644 (file)
@@ -69,8 +69,7 @@ spec:
           env:
           - name: CLAMP_URL
             value: http://policy-clamp-runtime-acm:6969
-          ports:
-          - containerPort: {{ .Values.service.internalPort }}
+          ports: {{ include "common.containerPorts" . | nindent 12  }}
           # disable liveness probe when breakpoints set in debugger
           # so K8s doesn't restart unresponsive container
           {{- if eq .Values.liveness.enabled true }}
index b18be93..ec579d8 100755 (executable)
@@ -36,19 +36,18 @@ spec:
         - name: {{ include "common.name" . }}
           image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          ports:
-          - containerPort: {{ .Values.service.externalPort }}
+          ports: {{ include "common.containerPorts" . | nindent 12  }}
           {{- if eq .Values.liveness.enabled true }}
           livenessProbe:
             tcpSocket:
-              port: {{ .Values.service.externalPort }}
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
             periodSeconds: {{ .Values.liveness.periodSeconds }}
           {{ end -}}
           readinessProbe:
             httpGet:
               path: {{ .Values.readiness.path }}
-              port: {{ .Values.service.externalPort }}
+              port: {{ .Values.service.internalPort }}
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           volumeMounts: