From 77b9a23847e23d76c5a9b19a8c94618d3d842e2c Mon Sep 17 00:00:00 2001 From: Maurice Meyer Date: Tue, 22 Feb 2022 14:46:41 +0100 Subject: [PATCH] fix: make cronjob chart compatible with 1.20 --- charts/cronjob/Chart.yaml | 2 +- charts/cronjob/README.md | 2 +- charts/cronjob/templates/cronjob.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/cronjob/Chart.yaml b/charts/cronjob/Chart.yaml index 70d4b4a0..fa479a86 100644 --- a/charts/cronjob/Chart.yaml +++ b/charts/cronjob/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: cronjob description: Run jobs on a schedule type: application -version: 2.0.1 +version: 2.0.2 maintainers: - name: morremeyer email: charts@mor.re diff --git a/charts/cronjob/README.md b/charts/cronjob/README.md index 49b57d95..78c946ef 100644 --- a/charts/cronjob/README.md +++ b/charts/cronjob/README.md @@ -1,6 +1,6 @@ # cronjob -![Version: 2.0.1](https://img.shields.io/badge/Version-2.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 2.0.2](https://img.shields.io/badge/Version-2.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) Run jobs on a schedule diff --git a/charts/cronjob/templates/cronjob.yaml b/charts/cronjob/templates/cronjob.yaml index 143c73ad..4251662d 100644 --- a/charts/cronjob/templates/cronjob.yaml +++ b/charts/cronjob/templates/cronjob.yaml @@ -1,4 +1,4 @@ -{{- if .Capabilities.APIVersions.Has "batch/v1" }} +{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: batch/v1 {{- else -}} apiVersion: batch/v1beta1