From b8a39538419c7722d921cb15dba2c392e8bec0f0 Mon Sep 17 00:00:00 2001 From: ChandonPierre Date: Thu, 14 Nov 2024 21:45:24 -0500 Subject: [PATCH] fix(chart): batch api version --- charts/authentik/templates/resource-cleanup.yaml | 6 +++--- charts/authentik/templates/sync-job.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/authentik/templates/resource-cleanup.yaml b/charts/authentik/templates/resource-cleanup.yaml index abb6c4b..751ca95 100644 --- a/charts/authentik/templates/resource-cleanup.yaml +++ b/charts/authentik/templates/resource-cleanup.yaml @@ -38,10 +38,10 @@ roleRef: name: {{ .Release.Name }}-resource-cleanup-role apiGroup: rbac.authorization.k8s.io --- -{{- if and .Capabilities (lt (int .Capabilities.KubeVersion.Minor) 25) }} -apiVersion: batch/v1 -{{- else }} +{{- if semverCompare "<1.25-0" .Capabilities.KubeVersion.Version }} apiVersion: batch/v1beta1 +{{- else }} +apiVersion: batch/v1 {{- end }} kind: Job metadata: diff --git a/charts/authentik/templates/sync-job.yaml b/charts/authentik/templates/sync-job.yaml index 2847e66..867ff0b 100644 --- a/charts/authentik/templates/sync-job.yaml +++ b/charts/authentik/templates/sync-job.yaml @@ -1,9 +1,9 @@ {{- range ((.Values.customBlueprints).federation).ldap }} {{- if (.syncJob).enabled }} -{{- if and .Capabilities (lt (int .Capabilities.KubeVersion.Minor) 25) }} -apiVersion: batch/v1 -{{- else }} +{{- if semverCompare "<1.25-0" $.Capabilities.KubeVersion.Version }} apiVersion: batch/v1beta1 +{{- else }} +apiVersion: batch/v1 {{- end }} kind: CronJob metadata: