Include pathType on all ingress paths for 1.19+

This commit is contained in:
Alexander Olofsson 2021-09-03 09:50:18 +02:00
parent 16c2b8b648
commit 8097280ab0
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
6 changed files with 42 additions and 0 deletions

View file

@ -32,6 +32,9 @@ spec:
http:
paths:
- path: /
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Prefix
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service:

View file

@ -34,6 +34,9 @@ spec:
http:
paths:
- path: /
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Prefix
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service:

View file

@ -33,6 +33,9 @@ spec:
paths:
{{- range .paths }}
- path: {{ . }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: ImplementationSpecific
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service:

View file

@ -59,6 +59,9 @@ spec:
{{- range $config.csPaths }}
{{- if $.Values.ingress.traefikPaths }}
- path: {{ printf "/{path:%s}" (trimPrefix "/" .) | quote }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: ImplementationSpecific
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service:
@ -70,6 +73,9 @@ spec:
{{- end -}}
{{- else }}
- path: {{ . | quote }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: ImplementationSpecific
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service:
@ -86,6 +92,9 @@ spec:
{{- range $config.paths }}
{{- if $.Values.ingress.traefikPaths }}
- path: {{ printf "/{path:%s}" (trimPrefix "/" .) | quote }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: ImplementationSpecific
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service:
@ -97,6 +106,9 @@ spec:
{{- end -}}
{{- else }}
- path: {{ . | quote }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: ImplementationSpecific
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service:
@ -125,6 +137,9 @@ spec:
{{- if or (has . $csHosts) (has . $s2sHosts) }}
- path: /_matrix
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Prefix
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}}
service:
@ -138,6 +153,9 @@ spec:
{{- if and (has . $csHosts) $.Values.ingress.includeUnderscoreSynapse }}
- path: /_synapse
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Prefix
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}}
service:
@ -152,6 +170,9 @@ spec:
{{- if has . $wkHosts }}
{{- if $.Values.wellknown.enabled }}
- path: /.well-known/matrix/client
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Exact
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}}
service:
@ -162,6 +183,9 @@ spec:
servicePort: 80
{{- end -}}
- path: /.well-known/matrix/server
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Exact
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}}
service:
@ -173,6 +197,9 @@ spec:
{{- end -}}
{{- else }}
- path: /.well-known/matrix/client
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Exact
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}}
service:

View file

@ -36,6 +36,9 @@ spec:
http:
paths:
- path: /
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Prefix
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service:

View file

@ -30,6 +30,9 @@ spec:
http:
paths:
- path: /
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
pathType: Prefix
{{- end -}}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
service: