helm-charts/charts/open-webui/templates/ingress.yaml
Nicolò Ciraci fe7d2bb946
fix(namespace): add namespace explicitly
Signed-off-by: Nicolò Ciraci <ciraci.nicolo@gmail.com>
2024-12-05 15:49:51 +01:00

50 lines
1.2 KiB
YAML

{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "open-webui.name" . }}
namespace: {{ include "open-webui.namespace" . }}
labels:
{{- include "open-webui.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.class }}
ingressClassName: {{ . }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.ingress.host | quote }}
{{- range .Values.ingress.additionalHosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ default (printf "%s-tls" .Release.Name) .Values.ingress.existingSecret }}
{{- end }}
rules:
- host: {{ .Values.ingress.host }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "open-webui.name" . }}
port:
name: http
{{- range .Values.ingress.additionalHosts }}
- host: {{ . | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "open-webui.name" $ }}
port:
name: http
{{- end }}
{{- end }}