fix(argo-workflows): use template for ingress .Capabilities (#795)

* fix(argo-workflows): use argo-workflows.ingress.apiVersion for ingress (#794)

Signed-off-by: Sevan Murriguian-Watrin <smurriguian@smartadserver.com>

* feat(argo-workflows): Add option to override kubeVersion

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

Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
This commit is contained in:
Sevan 2021-06-08 15:14:55 +02:00 committed by GitHub
parent 87af20fd06
commit eecc88fbd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 8 deletions

View file

@ -19,7 +19,7 @@ metadata:
{{- toYaml .Values.server.ingress.labels | nindent 4 }}
{{- end }}
spec:
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
{{- with .Values.server.ingress.ingressClassName }}
ingressClassName: {{ . }}
{{- end }}
@ -35,11 +35,11 @@ spec:
{{- end }}
{{- range $p := $paths }}
- path: {{ $p }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
pathType: Prefix
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
service:
name: {{ $serviceName }}
port:
@ -62,11 +62,11 @@ spec:
{{- end }}
{{- range $p := $paths }}
- path: {{ $p }}
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
pathType: Prefix
{{- end }}
backend:
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
service:
name: {{ $serviceName }}
port: