Add ingress support

This commit is contained in:
Grégoire Compagnon 2023-08-07 18:59:53 +02:00
parent 46718f2c0c
commit 8491d3c5ba
No known key found for this signature in database
GPG Key ID: FCE2B21F080063F4
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,31 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "invidious.fullname" . }}
labels:
app: {{ template "invidious.name" . }}
chart: {{ .Chart.Name }}
release: {{ .Release.Name }}
annotations: {{- toYaml .Values.ingress.annotations | nindent 4 }}
spec:
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host }}
http:
paths:
- pathType: Prefix
path: {{ .path | default "/" }}
backend:
service:
name: {{ template "invidious.fullname" $ }}
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- if .Values.ingress.tls }}
tls: {{ toYaml .Values.ingress.tls | nindent 4 }}
{{- end }}
{{- end }}

View File

@ -18,6 +18,18 @@ service:
port: 3000
#loadBalancerIP:
ingress:
enabled: true
annotations: {}
ingressClassName:
hosts:
- host: invidious.mydomain.local
path: /
tls:
- host: invidious.mydomain.local
secretName: my-tls
resources: {}
#requests:
# cpu: 100m