From c8fa8afcbd87019335fb68eeab8b377886c0f9ce Mon Sep 17 00:00:00 2001 From: alphayax Date: Sat, 27 Jan 2024 10:32:45 +0100 Subject: [PATCH] Helm chart: Add the ability to define the node port to use when service is NodePort. Default is 32400. --- charts/plex-media-server/templates/service.yaml | 3 +++ charts/plex-media-server/values.yaml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/charts/plex-media-server/templates/service.yaml b/charts/plex-media-server/templates/service.yaml index 29e7dc1..2911d59 100644 --- a/charts/plex-media-server/templates/service.yaml +++ b/charts/plex-media-server/templates/service.yaml @@ -13,6 +13,9 @@ spec: ports: - port: {{ .Values.service.port }} targetPort: 32400 + {{- if eq .Values.service.type "NodePort" }} + nodePort: {{ default "32400" .Values.service.nodePort }} + {{- end }} protocol: TCP name: pms selector: diff --git a/charts/plex-media-server/values.yaml b/charts/plex-media-server/values.yaml index e8b46c2..ba3fabd 100644 --- a/charts/plex-media-server/values.yaml +++ b/charts/plex-media-server/values.yaml @@ -144,6 +144,9 @@ service: type: ClusterIP port: 32400 + # Port to use when type of service is "NodePort" (32400 by default) + #nodePort: 32400 + # optional extra annotations to add to the service resource annotations: {}