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>pull/796/head^2 argo-workflows-0.2.5
parent
87af20fd06
commit
eecc88fbd7
|
@ -2,7 +2,7 @@ apiVersion: v2
|
||||||
name: argo-workflows
|
name: argo-workflows
|
||||||
description: A Helm chart for Argo Workflows
|
description: A Helm chart for Argo Workflows
|
||||||
type: application
|
type: application
|
||||||
version: 0.2.4
|
version: 0.2.5
|
||||||
appVersion: "v3.0.2"
|
appVersion: "v3.0.2"
|
||||||
icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png
|
icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png
|
||||||
home: https://github.com/argoproj/argo-helm
|
home: https://github.com/argoproj/argo-helm
|
||||||
|
|
|
@ -94,11 +94,18 @@ Create the name of the controller service account to use
|
||||||
Return the appropriate apiVersion for ingress
|
Return the appropriate apiVersion for ingress
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "argo-workflows.ingress.apiVersion" -}}
|
{{- define "argo-workflows.ingress.apiVersion" -}}
|
||||||
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.Version -}}
|
{{- if semverCompare "<1.14-0" (include "argo-workflows.kubeVersion" $) -}}
|
||||||
{{- print "extensions/v1beta1" -}}
|
{{- print "extensions/v1beta1" -}}
|
||||||
{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version -}}
|
{{- else if semverCompare "<1.19-0" (include "argo-workflows.kubeVersion" $) -}}
|
||||||
{{- print "networking.k8s.io/v1beta1" -}}
|
{{- print "networking.k8s.io/v1beta1" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- print "networking.k8s.io/v1" -}}
|
{{- print "networking.k8s.io/v1" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Return the target Kubernetes version
|
||||||
|
*/}}
|
||||||
|
{{- define "argo-workflows.kubeVersion" -}}
|
||||||
|
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride }}
|
||||||
|
{{- end -}}
|
||||||
|
|
|
@ -19,7 +19,7 @@ metadata:
|
||||||
{{- toYaml .Values.server.ingress.labels | nindent 4 }}
|
{{- toYaml .Values.server.ingress.labels | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
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 }}
|
{{- with .Values.server.ingress.ingressClassName }}
|
||||||
ingressClassName: {{ . }}
|
ingressClassName: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@ -35,11 +35,11 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range $p := $paths }}
|
{{- range $p := $paths }}
|
||||||
- path: {{ $p }}
|
- path: {{ $p }}
|
||||||
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
|
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
{{- end }}
|
{{- end }}
|
||||||
backend:
|
backend:
|
||||||
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
|
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
||||||
service:
|
service:
|
||||||
name: {{ $serviceName }}
|
name: {{ $serviceName }}
|
||||||
port:
|
port:
|
||||||
|
@ -62,11 +62,11 @@ spec:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range $p := $paths }}
|
{{- range $p := $paths }}
|
||||||
- path: {{ $p }}
|
- path: {{ $p }}
|
||||||
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
|
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
{{- end }}
|
{{- end }}
|
||||||
backend:
|
backend:
|
||||||
{{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
|
{{- if eq (include "argo-workflows.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
||||||
service:
|
service:
|
||||||
name: {{ $serviceName }}
|
name: {{ $serviceName }}
|
||||||
port:
|
port:
|
||||||
|
|
|
@ -20,6 +20,10 @@ nameOverride:
|
||||||
##
|
##
|
||||||
fullnameOverride:
|
fullnameOverride:
|
||||||
|
|
||||||
|
## Override the Kubernetes version, which is used to evaluate certain manifests
|
||||||
|
##
|
||||||
|
kubeVersionOverride: ""
|
||||||
|
|
||||||
# Restrict Argo to only deploy into a single namespace by apply Roles and RoleBindings instead of the Cluster equivalents,
|
# Restrict Argo to only deploy into a single namespace by apply Roles and RoleBindings instead of the Cluster equivalents,
|
||||||
# and start argo-cli with the --namespaced flag. Use it in clusters with strict access policy.
|
# and start argo-cli with the --namespaced flag. Use it in clusters with strict access policy.
|
||||||
singleNamespace: false
|
singleNamespace: false
|
||||||
|
|
Loading…
Reference in New Issue