[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 <joyceliu@yunify.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
de786c4b84
commit
0a21a58582
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user