From 70184f417f406c9094f22ef83747368dbab7f831 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Fri, 3 Sep 2021 09:58:36 +0200 Subject: [PATCH] Fix template rendering issues --- charts/element-web/templates/ingress.yaml | 10 +-- charts/funkwhale/templates/ingress.yaml | 10 +-- .../matrix-media-repo/templates/ingress.yaml | 10 +-- charts/matrix-synapse/templates/ingress.yaml | 88 +++++++++---------- charts/netbox/templates/ingress.yaml | 10 +-- charts/radosgw/templates/ingress.yaml | 10 +-- 6 files changed, 69 insertions(+), 69 deletions(-) diff --git a/charts/element-web/templates/ingress.yaml b/charts/element-web/templates/ingress.yaml index 5dc229a..61db19f 100644 --- a/charts/element-web/templates/ingress.yaml +++ b/charts/element-web/templates/ingress.yaml @@ -32,17 +32,17 @@ spec: http: paths: - path: / -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: Prefix -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: {{ $svcPort }} -{{- else -}} +{{- else }} serviceName: {{ $fullName }} servicePort: {{ $svcPort }} -{{- end -}} +{{- end }} {{- end }} {{- end }} diff --git a/charts/funkwhale/templates/ingress.yaml b/charts/funkwhale/templates/ingress.yaml index 887672e..ae27428 100644 --- a/charts/funkwhale/templates/ingress.yaml +++ b/charts/funkwhale/templates/ingress.yaml @@ -34,16 +34,16 @@ spec: http: paths: - path: / -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: Prefix -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: http -{{- else -}} +{{- else }} serviceName: {{ $fullName }} servicePort: http -{{- end -}} +{{- end }} {{- end }} diff --git a/charts/matrix-media-repo/templates/ingress.yaml b/charts/matrix-media-repo/templates/ingress.yaml index 4b86933..72aae7a 100644 --- a/charts/matrix-media-repo/templates/ingress.yaml +++ b/charts/matrix-media-repo/templates/ingress.yaml @@ -33,18 +33,18 @@ spec: paths: {{- range .paths }} - path: {{ . }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: ImplementationSpecific -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: {{ $svcPort }} -{{- else -}} +{{- else }} serviceName: {{ $fullName }} servicePort: {{ $svcPort }} -{{- end -}} +{{- end }} {{- end }} {{- end }} {{- end }} diff --git a/charts/matrix-synapse/templates/ingress.yaml b/charts/matrix-synapse/templates/ingress.yaml index 30ab56c..a5d7eaa 100644 --- a/charts/matrix-synapse/templates/ingress.yaml +++ b/charts/matrix-synapse/templates/ingress.yaml @@ -59,32 +59,32 @@ spec: {{- range $config.csPaths }} {{- if $.Values.ingress.traefikPaths }} - path: {{ printf "/{path:%s}" (trimPrefix "/" .) | quote }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: ImplementationSpecific -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $service }} port: 8083 -{{- else -}} +{{- else }} serviceName: {{ $service }} servicePort: 8083 -{{- end -}} +{{- end }} {{- else }} - path: {{ . | quote }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: ImplementationSpecific -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $service }} port: 8083 -{{- else -}} +{{- else }} serviceName: {{ $service }} servicePort: 8083 -{{- end -}} +{{- end }} {{- end }} {{- end }} {{- end }} @@ -92,32 +92,32 @@ spec: {{- range $config.paths }} {{- if $.Values.ingress.traefikPaths }} - path: {{ printf "/{path:%s}" (trimPrefix "/" .) | quote }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: ImplementationSpecific -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $service }} port: 8083 -{{- else -}} +{{- else }} serviceName: {{ $service }} servicePort: 8083 -{{- end -}} +{{- end }} {{- else }} - path: {{ . | quote }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{ if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: ImplementationSpecific -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $service }} port: 8083 -{{- else -}} +{{- else }} serviceName: {{ $service }} servicePort: 8083 -{{- end -}} +{{- end }} {{- end }} {{- end }} {{- end }} @@ -137,78 +137,78 @@ spec: {{- if or (has . $csHosts) (has . $s2sHosts) }} - path: /_matrix -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} pathType: Prefix -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: 8008 -{{- else -}} +{{- else }} serviceName: {{ $fullName }} servicePort: 8008 -{{- end -}} +{{- end }} {{- end }} {{- if and (has . $csHosts) $.Values.ingress.includeUnderscoreSynapse }} - path: /_synapse -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} pathType: Prefix -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: 8008 -{{- else -}} +{{- else }} serviceName: {{ $fullName }} servicePort: 8008 -{{- end -}} +{{- end }} {{- end }} {{- if has . $wkHosts }} {{- if $.Values.wellknown.enabled }} - path: /.well-known/matrix/client -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} pathType: Exact -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: {{ $wkName }} port: 80 {{- else -}} serviceName: {{ $wkName }} servicePort: 80 -{{- end -}} +{{- end }} - path: /.well-known/matrix/server -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: Exact -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: {{ $wkName }} port: 80 -{{- else -}} +{{- else }} serviceName: {{ $wkName }} servicePort: 80 -{{- end -}} +{{- end }} {{- else }} - path: /.well-known/matrix/client -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} pathType: Exact -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: 8008 -{{- else -}} +{{- else }} serviceName: {{ $fullName }} servicePort: 8008 -{{- end -}} +{{- end }} {{- end }} {{- end }} {{- end }} diff --git a/charts/netbox/templates/ingress.yaml b/charts/netbox/templates/ingress.yaml index 954b028..6627cc9 100644 --- a/charts/netbox/templates/ingress.yaml +++ b/charts/netbox/templates/ingress.yaml @@ -36,17 +36,17 @@ spec: http: paths: - path: / -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: Prefix -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: http -{{- else -}} +{{- else }} serviceName: {{ $fullName }} servicePort: http -{{- end -}} +{{- end }} {{- end }} {{- end }} diff --git a/charts/radosgw/templates/ingress.yaml b/charts/radosgw/templates/ingress.yaml index 67192f9..d62040a 100644 --- a/charts/radosgw/templates/ingress.yaml +++ b/charts/radosgw/templates/ingress.yaml @@ -30,16 +30,16 @@ spec: http: paths: - path: / -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} pathType: Prefix -{{- end -}} +{{- end }} backend: -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }} service: name: {{ $fullName }} port: http -{{- else -}} +{{- else }} serviceName: {{ $fullName }} servicePort: http -{{- end -}} +{{- end }} {{- end }}