feat: Add ability to override api versions for argocd
Signed-off-by: Atze de Vries <devries@zorgdomein.nl>
This commit is contained in:
parent
f6069848f5
commit
5c7e4c32d4
4 changed files with 17 additions and 3 deletions
|
@ -2,7 +2,7 @@ apiVersion: v2
|
|||
appVersion: 2.0.1
|
||||
description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes.
|
||||
name: argo-cd
|
||||
version: 3.6.2
|
||||
version: 3.6.3
|
||||
home: https://github.com/argoproj/argo-helm
|
||||
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
|
||||
keywords:
|
||||
|
|
|
@ -144,7 +144,9 @@ app.kubernetes.io/component: {{ .component }}
|
|||
Return the appropriate apiVersion for ingress
|
||||
*/}}
|
||||
{{- define "argo-cd.ingress.apiVersion" -}}
|
||||
{{- if semverCompare "<1.14-0" (include "argo-cd.kubeVersion" $) -}}
|
||||
{{- if .Values.APIOverrides -}}
|
||||
{{- print .Values.APIOverrides.ingress -}}
|
||||
{{- else if semverCompare "<1.14-0" (include "argo-cd.kubeVersion" $) -}}
|
||||
{{- print "extensions/v1beta1" -}}
|
||||
{{- else if semverCompare "<1.19-0" (include "argo-cd.kubeVersion" $) -}}
|
||||
{{- print "networking.k8s.io/v1beta1" -}}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{{- if .Values.server.certificate.enabled -}}
|
||||
{{- if .Capabilities.APIVersions.Has "cert-manager.io/v1" }}
|
||||
{{- if .Values.APIOverrides -}}
|
||||
apiVersion: {{ .Values.APIOverrides.certmanager }}
|
||||
{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1" }}
|
||||
apiVersion: cert-manager.io/v1
|
||||
{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1alpha3" }}
|
||||
apiVersion: cert-manager.io/v1alpha3
|
||||
|
|
|
@ -23,6 +23,16 @@ global:
|
|||
# hostnames:
|
||||
# - git.myhostname
|
||||
|
||||
# Override APIVersions
|
||||
# If you want to template helm charts but cannot access k8s API server
|
||||
# you can set api versions here
|
||||
APIOverrides:
|
||||
enabled: false
|
||||
certmanager: cert-manager.io/v1
|
||||
ingress: networking.k8s.io/v1beta1
|
||||
|
||||
|
||||
|
||||
## Controller
|
||||
controller:
|
||||
name: application-controller
|
||||
|
|
Loading…
Reference in a new issue