Skip to content

Use of deprecated CronJob API prevents use of operator on Kubernetes 1.25+

Summary

Operator is unable to run on Kubernetes 1.25 due to the use of batch/v1beta1 for CronJob instead of batch/v1

Steps to reproduce

Deploy operator on a Kubernetes 1.25 cluster

Current behavior

Operator is unable to reconcile deployments and enters a crashloop.

Expected behavior

Operator prefers batch/v1 over batch/v1beta1 for CronJob if available (or should just default to that at this point, it has been available since 1.21 which has been EOL since about summer this year)

Versions

  • Operator: 0.12.1
  • Kubernetes: 1.25

Relevant logs

ERROR	setup	problem running manager	{"error": "failed to wait for gitlab caches to sync: no matches for kind \"CronJob\" in version \"batch/v1beta1\""}