diff options
Diffstat (limited to 'templates/ingress.yaml')
-rw-r--r-- | templates/ingress.yaml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/templates/ingress.yaml b/templates/ingress.yaml new file mode 100644 index 0000000..b51d695 --- /dev/null +++ b/templates/ingress.yaml @@ -0,0 +1,42 @@ +--- +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "invidious.fullname" . -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "invidious.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ingressClassName: {{ .Values.ingress.className }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + pathType: {{ .pathType | default "ImplementationSpecific"}} + backend: + service: + name: {{ $fullName }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} +... |