From 2314cf78110642e5736eb046c92f10f9f4d3a607 Mon Sep 17 00:00:00 2001 From: mohammadll Date: Mon, 4 Nov 2024 16:21:55 +0330 Subject: [PATCH] fix(Helm): add configurable NodePort support for web service --- helm/templates/web/service.yaml | 3 +++ helm/values.yaml | 1 + 2 files changed, 4 insertions(+) diff --git a/helm/templates/web/service.yaml b/helm/templates/web/service.yaml index 10e8df6a..d8b7f72f 100644 --- a/helm/templates/web/service.yaml +++ b/helm/templates/web/service.yaml @@ -10,5 +10,8 @@ spec: - port: {{ .Values.web.service.port }} targetPort: {{ .Values.web.service.targetPort }} protocol: {{ .Values.web.service.protocol }} + {{- if eq .Values.web.service.type "NodePort" }} + nodePort: {{ .Values.web.service.nodePort }} + {{- end }} selector: {{- include "web.labels" . | nindent 4 }} diff --git a/helm/values.yaml b/helm/values.yaml index efd93a6c..669731ee 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -14,6 +14,7 @@ web: port: 80 targetPort: 8080 protocol: TCP + nodePort: 30080 environment: OPENAI_API_KEY: "" nodeSelector: {}