feat(argo-cd): Add compatibility to v1 Ingress (#637)

* feat(argo-cd): Add compatibility to v1 Ingress

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

* chore(argo-cd): Add spaces to improve readability

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

* feat(argo-cd): Bump chart version

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

* fix: Apply review changes

Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>

Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com>

Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
Marco Kilchhofer 2021-04-21 21:31:16 +02:00 committed by GitHub
parent abcd61717f
commit 49ccf4ae8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 119 additions and 44 deletions

View file

@ -138,4 +138,17 @@ app.kubernetes.io/instance: {{ .context.Release.Name }}
{{- if .component }}
app.kubernetes.io/component: {{ .component }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Return the appropriate apiVersion for ingress
*/}}
{{- define "argo-cd.ingress.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "networking.k8s.io/v1beta1" -}}
{{- else -}}
{{- print "networking.k8s.io/v1" -}}
{{- end -}}
{{- end -}}