From 8097280ab097e9d76376f301f5f344fba493ce9b Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Fri, 3 Sep 2021 09:50:18 +0200 Subject: [PATCH] Include pathType on all ingress paths for 1.19+ --- charts/element-web/templates/ingress.yaml | 3 +++ charts/funkwhale/templates/ingress.yaml | 3 +++ .../matrix-media-repo/templates/ingress.yaml | 3 +++ charts/matrix-synapse/templates/ingress.yaml | 27 +++++++++++++++++++ charts/netbox/templates/ingress.yaml | 3 +++ charts/radosgw/templates/ingress.yaml | 3 +++ 6 files changed, 42 insertions(+) diff --git a/charts/element-web/templates/ingress.yaml b/charts/element-web/templates/ingress.yaml index 840d9f6..5dc229a 100644 --- a/charts/element-web/templates/ingress.yaml +++ b/charts/element-web/templates/ingress.yaml @@ -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: diff --git a/charts/funkwhale/templates/ingress.yaml b/charts/funkwhale/templates/ingress.yaml index 2cc1a14..887672e 100644 --- a/charts/funkwhale/templates/ingress.yaml +++ b/charts/funkwhale/templates/ingress.yaml @@ -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: diff --git a/charts/matrix-media-repo/templates/ingress.yaml b/charts/matrix-media-repo/templates/ingress.yaml index 9aa11fd..4b86933 100644 --- a/charts/matrix-media-repo/templates/ingress.yaml +++ b/charts/matrix-media-repo/templates/ingress.yaml @@ -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: diff --git a/charts/matrix-synapse/templates/ingress.yaml b/charts/matrix-synapse/templates/ingress.yaml index bd28613..30ab56c 100644 --- a/charts/matrix-synapse/templates/ingress.yaml +++ b/charts/matrix-synapse/templates/ingress.yaml @@ -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: diff --git a/charts/netbox/templates/ingress.yaml b/charts/netbox/templates/ingress.yaml index a80423f..954b028 100644 --- a/charts/netbox/templates/ingress.yaml +++ b/charts/netbox/templates/ingress.yaml @@ -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: diff --git a/charts/radosgw/templates/ingress.yaml b/charts/radosgw/templates/ingress.yaml index 7ec545b..67192f9 100644 --- a/charts/radosgw/templates/ingress.yaml +++ b/charts/radosgw/templates/ingress.yaml @@ -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: