11{{- if .Values.ingress.enabled }}
2+ ---
23apiVersion : {{ include "nextcloud.ingress.apiVersion" . }}
34kind : Ingress
45metadata :
@@ -9,37 +10,37 @@ metadata:
910 app.kubernetes.io/instance : {{ .Release.Name }}
1011 app.kubernetes.io/managed-by : {{ .Release.Service }}
1112 app.kubernetes.io/component : app
12- {{- if .Values.ingress.labels }}
13- {{ toYaml .Values.ingress.labels | indent 4 }}
14- {{- end }}
15- {{- if .Values.ingress.annotations }}
13+ {{- with .Values.ingress.labels }}
14+ {{- toYaml . | nindent 4 }}
15+ {{- end }}
16+ {{- with .Values.ingress.annotations }}
1617 annotations :
17- {{ toYaml .Values.ingress.annotations | indent 4 }}
18- {{- end }}
18+ {{- toYaml . | nindent 4 }}
19+ {{- end }}
1920spec :
20- {{- if .Values.ingress.className }}
21- ingressClassName : {{ .Values.ingress.className }}
21+ {{- with .Values.ingress.className }}
22+ ingressClassName : {{ . }}
2223 {{- end }}
2324 rules :
24- - host : {{ .Values.nextcloud.host }}
25- http :
26- paths :
27- - path : {{ .Values.ingress.path }}
28- {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }}
29- pathType : {{ .Values.ingress.pathType }}
30- {{- end }}
31- backend :
32- {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }}
33- service :
34- name : {{ template "nextcloud.fullname" . }}
35- port :
36- number : {{ .Values.service.port }}
37- {{- else }}
38- serviceName : {{ template "nextcloud.fullname" . }}
39- servicePort : {{ .Values.service.port }}
40- {{- end }}
41- {{- if .Values.ingress.tls }}
25+ - host : {{ .Values.nextcloud.host }}
26+ http :
27+ paths :
28+ - path : {{ .Values.ingress.path }}
29+ {{- if ( eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }}
30+ pathType : {{ .Values.ingress.pathType }}
31+ {{- end }}
32+ backend :
33+ {{- if ( eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }}
34+ service :
35+ name : {{ template "nextcloud.fullname" . }}
36+ port :
37+ number : {{ .Values.service.port }}
38+ {{- else }}
39+ serviceName : {{ template "nextcloud.fullname" . }}
40+ servicePort : {{ .Values.service.port }}
41+ {{- end }}
42+ {{- with .Values.ingress.tls }}
4243 tls :
43- {{ toYaml .Values.ingress.tls | indent 4 }}
44- {{- end - }}
44+ {{- toYaml . | nindent 4 }}
45+ {{- end }}
4546{{- end }}
0 commit comments