summaryrefslogtreecommitdiff
path: root/templates/ingress.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'templates/ingress.yaml')
-rw-r--r--templates/ingress.yaml40
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 }}