From d8bea03a98c0ca452c86af015ce9cd5be3be3c20 Mon Sep 17 00:00:00 2001 From: Muhammad Salman Date: Tue, 15 Aug 2023 17:07:43 +0200 Subject: [PATCH 1/2] fix: k8s-resource cronjob apiversion update for k8s 1.25 --- stable/k8s-resources/Chart.yaml | 2 +- stable/k8s-resources/templates/cronjob.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/stable/k8s-resources/Chart.yaml b/stable/k8s-resources/Chart.yaml index c559bece..87b8cfe4 100644 --- a/stable/k8s-resources/Chart.yaml +++ b/stable/k8s-resources/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -version: 0.6.3 +version: 0.6.4 appVersion: 0.0.1 name: k8s-resources description: | diff --git a/stable/k8s-resources/templates/cronjob.yaml b/stable/k8s-resources/templates/cronjob.yaml index ccf18551..852c5fe8 100644 --- a/stable/k8s-resources/templates/cronjob.yaml +++ b/stable/k8s-resources/templates/cronjob.yaml @@ -1,6 +1,10 @@ {{- if .Values.CronJobs -}} {{- range .Values.CronJobs }} +{{- if semverCompare ">=1.25-0" $.Capabilities.KubeVersion.GitVersion -}} +apiVersion: batch/v1 +{{- else -}} apiVersion: batch/v1beta1 +{{- end }} kind: CronJob metadata: {{- if .namespace }} From b740450215f4fd0a104d84fa4c3af0a2edc293f1 Mon Sep 17 00:00:00 2001 From: Muhammad Salman Date: Tue, 15 Aug 2023 17:14:17 +0200 Subject: [PATCH 2/2] fix: update docs --- stable/k8s-resources/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/k8s-resources/README.md b/stable/k8s-resources/README.md index 4ab93b05..adaaf155 100644 --- a/stable/k8s-resources/README.md +++ b/stable/k8s-resources/README.md @@ -1,6 +1,6 @@ # k8s-resources -![Version: 0.6.3](https://img.shields.io/badge/Version-0.6.3-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) +![Version: 0.6.4](https://img.shields.io/badge/Version-0.6.4-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square) Not an application but a Helm chart to create any and many resources in Kubernetes.