From 8df326081c07b9ec7d84eaec7c61058ac6273625 Mon Sep 17 00:00:00 2001 From: MRColor Date: Wed, 8 Jan 2025 14:21:56 +0100 Subject: [PATCH] feat(charts/kubeai/charts/openwebui): Enhance service configuration to support NodePort and LoadBalancer with optional httpNodePort --- charts/kubeai/charts/openwebui/templates/service.yaml | 9 +++++++-- charts/kubeai/charts/openwebui/values.yaml | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/charts/kubeai/charts/openwebui/templates/service.yaml b/charts/kubeai/charts/openwebui/templates/service.yaml index 518efda0..79cf3749 100644 --- a/charts/kubeai/charts/openwebui/templates/service.yaml +++ b/charts/kubeai/charts/openwebui/templates/service.yaml @@ -7,9 +7,14 @@ metadata: spec: type: {{ .Values.service.type }} ports: - - port: {{ .Values.service.port }} + - name: http + port: {{ .Values.service.port }} targetPort: http protocol: TCP - name: http + {{ if or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer") }} + {{ if .Values.service.httpNodePort }} + nodePort: {{ .Values.service.httpNodePort }} + {{ end }} + {{ end }} selector: {{- include "openwebui.selectorLabels" . | nindent 4 }} diff --git a/charts/kubeai/charts/openwebui/values.yaml b/charts/kubeai/charts/openwebui/values.yaml index 6631afa9..419535bd 100644 --- a/charts/kubeai/charts/openwebui/values.yaml +++ b/charts/kubeai/charts/openwebui/values.yaml @@ -42,6 +42,8 @@ securityContext: {} service: type: ClusterIP port: 80 + # openwebui nodeport (Optional): Specify NodePort for openwebui if Nodeport or LoadBalancer service type (leave empty for random assignment) + httpNodePort: "" ingress: enabled: false