From 710d9f421e31a48d2d7353cd024b3aa1c78478f5 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Sun, 16 Apr 2023 19:19:29 +0000 Subject: [PATCH] udp suffix --- k8s/apps/videohosting/templates/sts-linuxservices.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/k8s/apps/videohosting/templates/sts-linuxservices.yaml b/k8s/apps/videohosting/templates/sts-linuxservices.yaml index bea6179..82c114b 100644 --- a/k8s/apps/videohosting/templates/sts-linuxservices.yaml +++ b/k8s/apps/videohosting/templates/sts-linuxservices.yaml @@ -28,12 +28,14 @@ spec: name: "{{ $portName }}" protocol: TCP {{ end }} + {{- if $v.ports.udp -}} {{ range $portName, $portValue := $v.ports.udp }} - port: {{ $portValue }} targetPort: {{ $portValue }} name: "{{ $portName }}-udp" protocol: UDP {{ end }} + {{- end -}} --- apiVersion: apps/v1 kind: StatefulSet @@ -82,10 +84,12 @@ spec: - containerPort: {{ $portValue }} protocol: TCP {{ end }} + {{- if $v.ports.udp -}} {{ range $portName, $portValue := $v.ports.udp }} - containerPort: {{ $portValue }} protocol: UDP {{ end }} + {{ end }} volumeMounts: - name: config mountPath: /config