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/v1 the default apiVersion for the backup CronJob. The database reindex CronJob already hardcodes batch/v1.
  • Keeps global.batch.cronJob.apiVersion as an override. It now accepts any value, not only batch/v1, which matches how the HPA and PDB overrides work.
  • Updates spec/configuration/toolbox_spec.rb and states the default in doc/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:

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

🤖 Generated with Claude Code

Edited by João Alexandre Cunha

Merge request reports

Loading
Loading