Skip to content

Commit

Permalink
Add option to set nodePort value for helm charts (#362)
Browse files Browse the repository at this point in the history
## Summary
Enhanced `kubeai` and `openwebui` Helm charts to support `NodePort` and
`LoadBalancer` types with optional custom `nodePort` values for
consistent and flexible service exposure.
  • Loading branch information
MRColorR authored Jan 13, 2025
1 parent b1cc572 commit 6596694
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
7 changes: 5 additions & 2 deletions charts/kubeai/charts/openwebui/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
- name: http
port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
{{- with .Values.service.nodePort }}
nodePort: {{ . }}
{{- end }}
selector:
{{- include "openwebui.selectorLabels" . | nindent 4 }}
2 changes: 2 additions & 0 deletions charts/kubeai/charts/openwebui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
nodePort: ""

ingress:
enabled: false
Expand Down
11 changes: 5 additions & 6 deletions charts/kubeai/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ metadata:
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
- name: http
port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
- port: 8080
targetPort: 8080
protocol: TCP
name: http-metrics
{{- with .Values.service.nodePort }}
nodePort: {{ . }}
{{- end }}
selector:
{{- include "kubeai.selectorLabels" . | nindent 4 }}
9 changes: 8 additions & 1 deletion charts/kubeai/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ messaging:
# Configure the openwebui subchart.
openwebui:
fullnameOverride: "openwebui"
service:
type: ClusterIP # ClusterIP, NodePort, LoadBalancer
port: 80
# openwebui nodeport (Optional): Specify NodePort for openwebui if Nodeport or LoadBalancer service type (leave empty for random assignment)
nodePort: ""
image:
tag: v0.3.19
env:
Expand Down Expand Up @@ -284,8 +289,10 @@ securityContext:
# runAsUser: 1000

service:
type: ClusterIP
type: ClusterIP # ClusterIP, NodePort, LoadBalancer
port: 80
# kubeai nodeport (Optional): Specify NodePort for kubeai if Nodeport or LoadBalancer service type (leave empty for random assignment)
nodePort: ""

ingress:
enabled: false
Expand Down

0 comments on commit 6596694

Please sign in to comment.