diff options
author | Patrick Spek <p.spek@tyil.nl> | 2022-07-29 08:09:47 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2022-07-29 08:09:47 +0200 |
commit | daf172833ca8ded43acaa32d03aae918af4c28c3 (patch) | |
tree | 9dd105768a634b46541f7c3b9dff5d02d6204a8b /templates/ingress.yaml |
Diffstat (limited to 'templates/ingress.yaml')
-rw-r--r-- | templates/ingress.yaml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/templates/ingress.yaml b/templates/ingress.yaml new file mode 100644 index 0000000..906015a --- /dev/null +++ b/templates/ingress.yaml @@ -0,0 +1,40 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "nitter.fullname" . -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "nitter.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 }} |