From 8ca39f58fde54081c8d33359f270d10736396fae Mon Sep 17 00:00:00 2001 From: gurgenh Date: Wed, 9 Oct 2024 20:19:08 +0400 Subject: [PATCH] Fix Cronjob apiVersion for ArgoCD --- helm/charts/scheduled-volume-snapshotter/templates/cronjob.yaml | 2 +- helm/charts/scheduled-volume-snapshotter/values.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/helm/charts/scheduled-volume-snapshotter/templates/cronjob.yaml b/helm/charts/scheduled-volume-snapshotter/templates/cronjob.yaml index ca17e6b..839f3b8 100644 --- a/helm/charts/scheduled-volume-snapshotter/templates/cronjob.yaml +++ b/helm/charts/scheduled-volume-snapshotter/templates/cronjob.yaml @@ -1,4 +1,4 @@ -{{- if .Capabilities.APIVersions.Has "batch/v1/CronJob" -}} +{{- if or .Values.useArgoCD .Capabilities.APIVersions.Has "batch/v1/CronJob" -}} apiVersion: batch/v1 {{- else }} apiVersion: batch/v1beta1 diff --git a/helm/charts/scheduled-volume-snapshotter/values.yaml b/helm/charts/scheduled-volume-snapshotter/values.yaml index 24d0894..30c97a7 100644 --- a/helm/charts/scheduled-volume-snapshotter/values.yaml +++ b/helm/charts/scheduled-volume-snapshotter/values.yaml @@ -2,6 +2,8 @@ cronLabels: {} #key: "value" +useArgoCD: false + image: repository: ryaneorth/scheduled-volume-snapshotter #tag: latest