From 3c4cc60277951581562508215c6be96edad69fb5 Mon Sep 17 00:00:00 2001 From: Zhecho Zhechev Date: Fri, 8 Mar 2024 10:09:21 +0200 Subject: [PATCH] feat(helm): adding lb class and labels for using it with Cilium CNI l2 annoncements mode --- kubernetes/helm/templates/webui-service.yaml | 17 +++++++++++------ kubernetes/helm/values.yaml | 2 ++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/kubernetes/helm/templates/webui-service.yaml b/kubernetes/helm/templates/webui-service.yaml index 58da030d3..9ccd9b9e9 100644 --- a/kubernetes/helm/templates/webui-service.yaml +++ b/kubernetes/helm/templates/webui-service.yaml @@ -4,6 +4,9 @@ metadata: name: {{ include "open-webui.name" . }} labels: {{- include "open-webui.labels" . | nindent 4 }} + {{- with .Values.webui.service.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.webui.service.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -11,14 +14,16 @@ metadata: spec: selector: {{- include "open-webui.selectorLabels" . | nindent 4 }} -{{- with .Values.webui.service }} - type: {{ .type }} + type: {{ .Values.webui.service.type | default "ClusterIP" }} ports: - protocol: TCP name: http - port: {{ .port }} + port: {{ .Values.webui.service.port }} targetPort: http - {{- if .nodePort }} - nodePort: {{ .nodePort | int }} + {{- if .Values.webui.service.nodePort }} + nodePort: {{ .Values.webui.service.nodePort | int }} {{- end }} -{{- end }} + {{- if .Values.webui.service.loadBalancerClass }} + loadBalancerClass: {{ .Values.webui.service.loadBalancerClass | quote }} + {{- end }} + diff --git a/kubernetes/helm/values.yaml b/kubernetes/helm/values.yaml index 3104dc842..394e5a491 100644 --- a/kubernetes/helm/values.yaml +++ b/kubernetes/helm/values.yaml @@ -70,3 +70,5 @@ webui: port: 80 containerPort: 8080 nodePort: "" + labels: {} + loadBalancerClass: ""