11{{- if .Values.ingress.enabled }}
2+ ---
23apiVersion : {{ include "nextcloud.ingress.apiVersion" . }}
34kind : Ingress
45metadata :
@@ -9,27 +10,27 @@ 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 :
2425 - host : {{ .Values.nextcloud.host }}
2526 http :
2627 paths :
2728 - path : {{ .Values.ingress.path }}
28- {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }}
29+ {{- if ( eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }}
2930 pathType : {{ .Values.ingress.pathType }}
3031 {{- end }}
3132 backend :
32- {{- if eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1" }}
33+ {{- if ( eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }}
3334 service :
3435 name : {{ template "nextcloud.fullname" . }}
3536 port :
3839 serviceName : {{ template "nextcloud.fullname" . }}
3940 servicePort : {{ .Values.service.port }}
4041 {{- end }}
41- {{- if .Values.ingress.tls }}
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