From 0a21a58582c1fd244c8269c54f7a601bc73dc7cf Mon Sep 17 00:00:00 2001 From: KubeSphere CI Bot <47586280+ks-ci-bot@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:45:10 +0800 Subject: [PATCH] [release-4.1] fix: cronjob.batch/v1 is invalid in k8s v1.19 (#6188) fix: auto update extension museum only when kubernetes version > =v1.20.0 Signed-off-by: joyceliu Co-authored-by: joyceliu --- config/ks-core/Chart.yaml | 2 +- config/ks-core/templates/extension-museum.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/ks-core/Chart.yaml b/config/ks-core/Chart.yaml index 76961973a..3ef8f06ca 100644 --- a/config/ks-core/Chart.yaml +++ b/config/ks-core/Chart.yaml @@ -7,7 +7,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.1.1 +version: 1.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/config/ks-core/templates/extension-museum.yaml b/config/ks-core/templates/extension-museum.yaml index ae9ca355d..8b601cb23 100644 --- a/config/ks-core/templates/extension-museum.yaml +++ b/config/ks-core/templates/extension-museum.yaml @@ -51,7 +51,7 @@ spec: url: http://extensions-museum.{{ .Release.Namespace }}.svc --- -apiVersion: batch/v1 +apiVersion: {{ if semverCompare ">=1.20.0" .Capabilities.KubeVersion.Version }}batch/v1{{ else }}batch/v1beta1{{end}} kind: CronJob metadata: name: restart-extensions-museum