11{{- if .Values.ingress.enabled }}
2+ {{- $fullName := include "retool.fullname" . -}}
3+ {{- $svcPort := .Values.service.externalPort -}}
4+ {{- $pathType := .Values.ingress.pathType -}}
25{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
36apiVersion : networking.k8s.io/v1
47{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
@@ -19,26 +22,51 @@ metadata:
1922{{- end }}
2023 name : {{ template "retool.fullname" . }}
2124spec :
25+ {{- if and .Values.ingress.ingressClassName (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
26+ ingressClassName : {{ .Values.ingress.ingressClassName }}
27+ {{- end }}
2228 rules :
23- - http :
24- paths :
25- - path : {{ .path }}
26- {{- if and .Values.ingress.pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
27- pathType : {{ .Values.ingress.pathType }}
28- {{- end }}
29- backend :
30- {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
31- service :
32- name : {{ template "retool.fullname" . }}
33- port :
34- number : {{ .Values.service.externalPort }}
35- {{- else }}
36- serviceName : {{ template "retool.fullname" . }}
37- servicePort : {{ .Values.service.externalPort }}
29+ {{- if .Values.ingress.hostName }}
30+ - host : {{ .Values.ingress.hostName | quote }}
31+ http :
32+ paths :
33+ - path :
34+ {{- if and $pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
35+ pathType : {{ $pathType }}
36+ {{- end }}
37+ backend :
38+ {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
39+ service :
40+ name : {{ $fullName }}
41+ port :
42+ number : {{ $svcPort }}
43+ {{- else }}
44+ serviceName : {{ $fullName }}
45+ servicePort : {{ $svcPort }}
46+ {{- end }}
47+ {{- else }}
48+ {{- range .Values.ingress.hosts }}
49+ - host : {{ .host | quote }}
50+ http :
51+ paths :
52+ {{- range .paths }}
53+ - path : {{ .path }}
54+ {{- if and $pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
55+ pathType : {{ $pathType }}
56+ {{- end }}
57+ backend :
58+ {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
59+ service :
60+ name : {{ $fullName }}
61+ port :
62+ number : {{ $svcPort }}
63+ {{- else }}
64+ serviceName : {{ $fullName }}
65+ servicePort : {{ $svcPort }}
66+ {{- end }}
3867 {{- end }}
39- {{- if .Values.ingress.hostName }}
40- host : {{ .Values.ingress.hostName | quote }}
41- {{- end }}
68+ {{- end }}
69+ {{- end }}
4270{{- if .Values.ingress.tls }}
4371 tls :
4472{{ toYaml .Values.ingress.tls | indent 4 }}
0 commit comments