charts
charts copied to clipboard
Cronjob apiVersion - Kubernetes version 1.25+
The backup full/incremental charts are using the old apiVersion: batch/v1beta1
value which prevents use on k8 version 1.25+. batch/v1
has been stable since 1.21.
- https://github.com/dgraph-io/charts/blob/master/charts/dgraph/templates/backups/cronjob-full.yaml#L15
- https://github.com/dgraph-io/charts/blob/master/charts/dgraph/templates/backups/cronjob-inc.yaml#L15
What are your thoughts on checking the capabilities and automatically changing the version OR using a values override?
{{ if or ($.Capabilities.APIVersions.Has "batch/v1/CronJob") (eq $.Values.global.batch.cronJob.apiVersion "batch/v1") -}}
apiVersion: batch/v1
{{- else -}}
apiVersion: batch/v1beta1
{{- end }}