element-web: Fix K8s 1.19+ ingress configuration

This commit is contained in:
Alexander Olofsson 2021-09-11 14:58:24 +02:00
parent 76d0cc3fab
commit 0478552664
No known key found for this signature in database
GPG key ID: D439C9470CB04C73

View file

@ -1,9 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "element-web.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
{{- else -}}
{{- else }}
apiVersion: networking.k8s.io/v1beta1
{{- end }}
kind: Ingress
@ -32,11 +32,11 @@ spec:
http:
paths:
- path: /
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{ if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
{{ if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port: