allow to change container ports, fix default frontend ports

Signed-off-by: Pascal Sthamer <10992664+P4sca1@users.noreply.github.com>
This commit is contained in:
Pascal Sthamer
2025-01-02 09:09:36 +01:00
parent 95949415f3
commit 2980fba8c7
13 changed files with 144 additions and 26 deletions
@@ -144,7 +144,10 @@ spec:
{{- end }}
ports:
- name: http
containerPort: 5001
containerPort: {{ .Values.backend.containerPorts.http }}
{{- if .Values.backend.extraContainerPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.backend.extraContainerPorts "context" $) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.backend.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customLivenessProbe "context" $) | nindent 12 }}
@@ -152,7 +155,7 @@ spec:
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.backend.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /api/v1/health
port: 5001
port: {{ .Values.backend.containerPorts.http }}
{{- end }}
{{- if .Values.backend.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customReadinessProbe "context" $) | nindent 12 }}
@@ -160,7 +163,7 @@ spec:
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.backend.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /api/v1/health
port: 5001
port: {{ .Values.backend.containerPorts.http }}
{{- end }}
{{- if .Values.backend.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customStartupProbe "context" $) | nindent 12 }}
@@ -168,7 +171,7 @@ spec:
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.backend.startupProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /api/v1/health
port: 5001
port: {{ .Values.backend.containerPorts.http }}
{{- end }}
{{- end }}
{{- if .Values.backend.lifecycleHooks }}
@@ -35,7 +35,7 @@ spec:
{{- end }}
ingress:
- ports:
- port: 5001
- port: {{ .Values.backend.containerPorts.http }}
protocol: TCP
{{- if not .Values.backend.networkPolicy.allowExternal }}
from:
@@ -11,7 +11,7 @@ spec:
type: ClusterIP
ports:
- name: http
port: 5001
port: {{ .Values.backend.containerPorts.http }}
targetPort: http
protocol: TCP
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.backend.podLabels .Values.commonLabels) "context" .) }}
@@ -103,7 +103,14 @@ spec:
{{- end }}
ports:
- name: http
containerPort: 8080
containerPort: {{ .Values.frontend.containerPorts.http }}
{{- if .Values.frontend.containerPorts.https }}
- name: https
containerPort: {{ .Values.frontend.containerPorts.https }}
{{- end }}
{{- if .Values.frontend.extraContainerPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.frontend.extraContainerPorts "context" $) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.frontend.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.frontend.customLivenessProbe "context" $) | nindent 12 }}
@@ -111,7 +118,7 @@ spec:
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.frontend.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: 8080
port: {{ .Values.frontend.containerPorts.http }}
{{- end }}
{{- if .Values.frontend.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.frontend.customReadinessProbe "context" $) | nindent 12 }}
@@ -119,7 +126,7 @@ spec:
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.frontend.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: 8080
port: {{ .Values.frontend.containerPorts.http }}
{{- end }}
{{- if .Values.frontend.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.frontend.customStartupProbe "context" $) | nindent 12 }}
@@ -127,7 +134,7 @@ spec:
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.frontend.startupProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: 8080
port: {{ .Values.frontend.containerPorts.http }}
{{- end }}
{{- end }}
{{- if .Values.frontend.lifecycleHooks }}
@@ -36,7 +36,10 @@ spec:
ingress:
{{ if .Values.frontend.networkPolicy.allowExternal }}
- ports:
- port: 8080
- port: {{ .Values.frontend.containerPorts.http }}
{{- if .Values.frontend.containerPorts.https }}
- port: {{ .Values.frontend.containerPorts.https }}
{{- end }}
{{- end }}
{{- if .Values.frontend.networkPolicy.extraIngress }}
{{- include "common.tplvalues.render" ( dict "value" .Values.frontend.networkPolicy.extraIngress "context" $ ) | nindent 4 }}
@@ -11,8 +11,14 @@ spec:
type: ClusterIP
ports:
- name: http
port: 8080
port: {{ .Values.frontend.containerPorts.http }}
targetPort: http
protocol: TCP
{{- if .Values.frontend.containerPorts.https }}
- name: https
port: {{ .Values.frontend.containerPorts.https }}
targetPort: https
protocol: TCP
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .Values.frontend.podLabels .Values.commonLabels) "context" .) }}
selector: {{- include "shuffle.frontend.matchLabels" (dict "customLabels" $podLabels "context" $) | nindent 4 }}
@@ -21,10 +21,10 @@ spec:
- destination:
host: {{ include "shuffle.backend.name" . }}
port:
number: 5001
number: {{ .Values.backend.containerPorts.http }}
- route:
- destination:
host: {{ include "shuffle.frontend.name" . }}
port:
number: 8080
number: {{ .Values.frontend.containerPorts.http }}
{{- end }}
@@ -28,10 +28,10 @@ spec:
to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
kubernetes.io/metadata.name: kube-system
# Allow access to orborus
- ports:
- port: 8080
- port: {{ .Values.orborus.containerPorts.http }}
protocol: TCP
to:
- namespaceSelector:
@@ -107,7 +107,10 @@ spec:
{{- end }}
ports:
- name: http
containerPort: 8080
containerPort: {{ .Values.orborus.containerPorts.http }}
{{- if .Values.orborus.extraContainerPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.orborus.extraContainerPorts "context" $) | nindent 12 }}
{{- end }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.orborus.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.orborus.customLivenessProbe "context" $) | nindent 12 }}
@@ -115,7 +118,7 @@ spec:
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.orborus.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: 8080
port: {{ .Values.orborus.containerPorts.http }}
{{- end }}
{{- if .Values.orborus.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.orborus.customReadinessProbe "context" $) | nindent 12 }}
@@ -123,7 +126,7 @@ spec:
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.orborus.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: 8080
port: {{ .Values.orborus.containerPorts.http }}
{{- end }}
{{- if .Values.orborus.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.orborus.customStartupProbe "context" $) | nindent 12 }}
@@ -131,7 +134,7 @@ spec:
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.orborus.startupProbe "enabled") "context" $) | nindent 12 }}
httpGet:
path: /
port: 8080
port: {{ .Values.orborus.containerPorts.http }}
{{- end }}
{{- end }}
{{- if .Values.orborus.lifecycleHooks }}
@@ -31,7 +31,7 @@ spec:
kubernetes.io/metadata.name: kube-system
# Allow access to backend
- ports:
- port: 5001
- port: {{ .Values.backend.containerPorts.http }}
protocol: TCP
to:
- namespaceSelector:
@@ -55,7 +55,7 @@ spec:
{{- end }}
ingress:
- ports:
- port: 8080
- port: {{ .Values.orborus.containerPorts.http }}
protocol: TCP
{{- if not .Values.orborus.networkPolicy.allowExternal }}
from: