feat(argo-cd): Add ability to override API versions (#760)
* feat: Add ability to override api versions for argocd Signed-off-by: Atze de Vries <devries@zorgdomein.nl> * fix linting Signed-off-by: Atze de Vries <devries@zorgdomein.nl> * reimplement a bit and update chart version Signed-off-by: Atze de Vries <devries@zorgdomein.nl> * update to new minor Signed-off-by: Atze de Vries <devries@zorgdomein.nl> * fix spaces in comments Signed-off-by: Atze de Vries <devries@zorgdomein.nl> * Updated flow control and add documentation on apiVersionOverrides Signed-off-by: Atze de Vries <devries@zorgdomein.nl> * Add changelog annotation 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:
parent
a70d156217
commit
783cb3e029
5 changed files with 19 additions and 3 deletions
|
|
@ -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.apiVersionOverrides.ingress -}}
|
||||
{{- print .Values.apiVersionOverrides.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.apiVersionOverrides.certmanager -}}
|
||||
apiVersion: {{ .Values.apiVersionOverrides.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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue