Description
Per popular demand (see the beginning of the discussion: kubernetes/enhancements#19 (comment)) and considering that #40932 is going to limit the number of created Jobs sig-apps decided to migrate CronJobs to beta.
This issue is opened to discuss the following problems that were initially identified:
- Where the CronJobs should land?
- Do we want to keep backwards compatibility?
Ad. 1.
CronJobs currently live under batch/v2alpha1
, so the logical move to beta would be to introduce batch/v2beta
which eventually lead us to batch/v2
. Unfortunately, the full support for multiversioned API groups is still not perfect.
The alternative we've discussed during sig-apps call (@erictune and I prefer both agree on that one) is to extend the current version, rather than introducing a new one. This approach seems to be the most reasonable approach knowing the state of multiversioned support. Iow. CronJob would migrate to batch/v1beta1
and eventually to batch/v1
, when all the GA requirements gathered in kubernetes/enhancements#19 are fulfilled.
@kubernetes/api-approvers @kubernetes/sig-api-machinery-pr-reviews I'd like to hear your opinions on that
Ad. 2.
We've kept backwards compatibility when we were renaming from ScheduledJobs to CronJobs, by accepting old resources and converting them on the fly to CronJobs and stored as such. All HTTP actions are supported at both endpoints, iow. under apis/batch/v2alpha1/namespaces/*/cronjobs
and apis/batch/v2alpha1/namespaces/*/scheduledjobs
. Given that, we want to keep the batch/v2alpha1
endpoint available throughout 1.6 release and be dropped in 1.7. ScheduledJobs support will be entirely dropped with this change.
Action items:
- remove ScheduledJobs entirely from the code base - Remove scheduledjobs #49930
- implement new API version in batch
batch/v1beta1
- Promote CronJobs to batch/v1beta1 - just the API #41901 andEnable batch/v1beta1.CronJobs by default #51465Enable batch/v1beta1.CronJobs by default #51734 - inform users about deprecating
batch/v2alpha1
@kubernetes/sig-apps-misc fyi