Default toolbox backup CronJob to batch/v1
What does this MR do?
When the chart is rendered without cluster API discovery (for example helm template without --api-versions, as in many GitOps pipelines), the toolbox backup CronJob fell back to batch/v1beta1. Kubernetes removed that version in 1.25, and the oldest version the chart supports is 1.34.
This MR:
- Makes
batch/v1the defaultapiVersionfor the backupCronJob. The database reindexCronJobalready hardcodesbatch/v1. - Keeps
global.batch.cronJob.apiVersionas an override. It now accepts any value, not onlybatch/v1, which matches how the HPA and PDB overrides work. - Updates
spec/configuration/toolbox_spec.rband states the default indoc/charts/globals.md.
Verification: ran helm template with gitlab.toolbox.backups.cron.enabled=true. It renders batch/v1 by default and batch/global/v1 with the override set. RSpec ran locally at 5daea43ef with Ruby 3.3.12 and Helm 4.2.4 (the CI versions): spec/configuration/toolbox_spec.rb passes (23 examples, 0 failures). Both cron job apiVersion examples fail against master (2 failures), as expected. RuboCop reports no offenses.
It also removes the now-redundant global.batch.cronJob.apiVersion: batch/v1 pin from HELM_DEFAULT_SETTINGS in .gitlab-ci.yml, so the kubeconform and template check jobs exercise the chart's real default.
Kubernetes references:
batch/v1beta1CronJob is no longer served as of Kubernetes 1.25: Deprecated API Migration Guide – CronJob v1.25
Related issues
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
- Merge Request Title and Description are up to date, accurate, and descriptive.
- MR targeting the appropriate branch.
- MR has a green pipeline.
- Documentation created/updated.
- Tests added/updated.
- Have you validated that your change works end-to-end on a real cluster deployment?
- Describe how you did it in a comment.
- Equivalent MR/issue for omnibus-gitlab opened.
- When ready for review, MR is marked as ready (not a draft) and assigned to a reviewer.
Reviewers checklist
- As soon as you begin reviewing, select Start a review on your first comment so the MR shows Reviewer started review.
- MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab.
- Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.