kubernetes / enhancements

Enhancements tracking repo for Kubernetes
Apache License 2.0
3.43k stars 1.48k forks source link

CronJobs (previously ScheduledJobs) #19

Closed soltysh closed 2 years ago

soltysh commented 8 years ago

Enhancement Description

soltysh commented 8 years ago

@erictune fyi

philips commented 8 years ago

@soltysh On what SIG can I discuss this feature? I want to have a longer discussion about third-party resources for this feature and why we feel it needs to be built into core.

erictune commented 8 years ago

Let's use SIG-Apps for now. There has not been a lot of discussion of controllers there, that I have seen, but lets try and see how it goes.

gtaylor commented 8 years ago

Is this being considered for exclusion from the core? I had thought the proposal was already accepted.

soltysh commented 8 years ago

@gtaylor nothing has been decided yet. Currently it'll be part of alpha group in batch, what will happen when this migrates to more stable is not yet known.

davidopp commented 8 years ago

My understanding was that this was accepted into core, while job workflow was rejected for core. In fact we had originally planned to have it in 1.3.

soltysh commented 8 years ago

@davidopp my comment was based on the discussion we've previously had with @philips @erictune here. Although, personally I'd prefer SJ stay in the core :sunglasses:

davidopp commented 8 years ago

@soltysh I interpreted the comment as implying that it would be in core (based on the mention of alpha/beta and the statement "If someone were to produce a third-party version of scheduledJob, well before 1.4, and show that was comparably useful, that would be persuasive argument for the latter path" where the latter path was ThirdParty).

erictune commented 8 years ago

@davidopp that comment was made when I thought SJ would be Beta in 1.4. Now it is going to Alpha in 1.4. The philosophy was that we can cancel an alpha feature for whatever reason, but we should have a pretty high bar for cancelling a beta feature.

erictune commented 8 years ago

Also, to all working on SJ: we should continue work at full speed, despite the above conversation. Much of the work will apply either way, and we need to get some kind of feature out to users so they can give feedback.

soltysh commented 8 years ago

All SJ work is at full speed, the only remaining problem (hopefully) is to have https://github.com/kubernetes/kubernetes/pull/29187 in. I'm hoping to discuss this issue with @smarterclayton today or over the weekend and have it merged so next week we should see one after the other SJ PRs being merged.

eghobo commented 8 years ago

@soltysh: it looks like #29187 was merged, does it mean next 1.4 alpha release will have SJ ready to play?

soltysh commented 8 years ago

@eghobo that's the plan.

erictune commented 8 years ago

This needs docs in k8s.io, but it looks like code is in. Awesome!

davidopp commented 8 years ago

+100

janetkuo commented 8 years ago

@soltysh are docs considered done or are you adding more examples / tutorials? If docs are done we can check the docs box

soltysh commented 8 years ago

@janetkuo I usually mark them done once they merge. With that in mind I've checked the one against branch 1.4, the other will wait for merge.

soltysh commented 7 years ago

Since this was renamed to CronJobs I'll update the title to reflect that change as well.

ConorNevin commented 7 years ago

Is this going to be in beta for 1.5?

soltysh commented 7 years ago

@ConorNevin unfortunately not, see the beta requirements in the issue description what we need to address first to promote it to beta. Sorry :disappointed: Help with fixing those is highly encouraged though :smiley:

stp-ip commented 7 years ago

There is still https://github.com/wercker/cronetes, if one needs cronjob like functionality now without the ability to run alpha features.

vinay-g commented 7 years ago

Would run at most once feature be implemented in CronJobs ? I see that it was not included in the alpha - https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/scheduledjob.md#decision

soltysh commented 7 years ago

@vinay-g eventually, I guess so, but I have no idea when that will. Help is always welcomed though :)

JeanMertz commented 7 years ago

This feature is still attached to milestone 1.4, and the 1.6 milestone spreadsheet doesn't mention anything about Cron/ScheduledJobs.

Is this still on-schedule for a 1.6 beta release? As a GKE customer, I would love to start moving all our out-of-cluster crons onto the cluster itself (without using cronetes).

evmin commented 7 years ago

Indeed. This a much needed feature has been dragging on from 1.3 version if I am not mistaken. Myself I am in the same position - can not wait till it comes across so I can start pulling the on premise jobs onto GKE.

soltysh commented 7 years ago

I've modified the milestone to next, there are still quite a lot of work to be done for CronJobs to stabilize them, I'd love to push it forward more aggressive, but unfortunately the lack of time is the main factor I can't atm.

avaranovich commented 7 years ago

is imagePullSecrets supported in the ChronJob template?

idvoretskyi commented 7 years ago

@soltysh thank you for updating.

soltysh commented 7 years ago

is imagePullSecrets supported in the ChronJob template?

@avaranovich should be, since we're creating a Pod from the template. If it's not please fill in an issue and tag me there.

ApsOps commented 7 years ago

Hey @soltysh . I'd love to see in this beta soon! I want to help but not sure what is required/ the next step here. Can you please refine the checklist a bit (maybe create/point to relevant issues/docs)? 🙂

soltysh commented 7 years ago

@ApsOps before beta we definitely need to implement server-side removal, support google app engine and chronos format, and allow using timezones. Probably it would be nice to sweep the bugs that are on me that are related to CronJobs. I doubt it's doable for 1.6, but for next releases it's doable. Most importantly tag me in every issue/pr you create wrt to this topic.

erictune commented 7 years ago

@soltysh

I think quite a few people use CronJobs as they are now, and I mostly hear "when will it be beta", an not so much issues with alpha.

If we believe that we can add server-side removal, app-engine and chronos, and timezones without breaking the current API, then I don't see any reason not to move beta now, and add those things before GA.

evmin commented 7 years ago

+1 For CronJobs beta. As soon as they are beta and the cluster reset is not required, it would be a killing feature for a number of our workflows here.

niclashedam commented 7 years ago

We are looking forward to this feature going beta and we have had no problems with alpha.

soltysh commented 7 years ago

Personally I'd prefer address at least the removal part, there's someone already working on adding configurable limits for how many successful and failed jobs are left behind. And the removal is a key element, I think. Let's discuss the option of moving this to beta for 1.6 or 1.7 during upcoming sig-apps call. @michelleN mind adding this as a topic?

soltysh commented 7 years ago

@NiclasHedam have your problems been addressed, are there open issues I haven't seen, mind opening/pinging me in those?

niclashedam commented 7 years ago

They have all been addressed in 1.4.7

oscarbatori commented 7 years ago

Is there any plan to add GUI support this? For example, I can currently see the following:

[obatori@obatori:~] >> kubectl get cronjobs
NAME         SCHEDULE      SUSPEND   ACTIVE    LAST-SCHEDULE
cron-hello   */1 * * * *   False     0         Tue, 25 Jul 2017 09:11:00 -0400
hello        0 22 * * *    False     0         <none>

However, in the GUI I am only able to see historical execution, not current jobs and the schedule associated with them? Also, kubectl get does not list cronjob/cronjobs as valid resource types, though they do indeed work.

Naturally, I could be missing something, but exhaustive searching of the various parts of the GUI has yet to show me my jobs!

luxas commented 7 years ago

@oscarbatori Please open an issue in kubernetes/dashboard repository and ask for that enhancement.

oscarbatori commented 7 years ago

@luxas will do, thanks for your prompt response.

palak2011 commented 7 years ago

@soltysh Can you please add the k8s.io Docs PR for this feature for 1.8 release here: https://docs.google.com/spreadsheets/d/1AFksRDgAt6BGA3OjRNIiO3IyKmA-GU7CXaxbihy48ns/edit#gid=0

idvoretskyi commented 7 years ago

@soltysh this feature is listed at the features tracking spreadsheet - https://docs.google.com/spreadsheets/d/1AFksRDgAt6BGA3OjRNIiO3IyKmA-GU7CXaxbihy48ns/edit#gid=0, but doesn't have 1.8 milestone assigned.

Does this feature target 1.8?

soltysh commented 7 years ago

@idvoretskyi partially, the promotion to beta was targeted for 1.8 and happened in that timeframe. There's no milestone set for this, b/c there's no clear plan for the future promotion to stable, yet.

idvoretskyi commented 7 years ago

@soltysh understood. So, I'll mark with 1.8 milestone.

soltysh commented 7 years ago

Thanks!

soltysh commented 7 years ago

@idvoretskyi since there's one feature (Ability to start CronJobs manually) we'll be trying to get into 1.9 release related to CronJobs, I'll add 1.9 milstone here, is that ok? I don't want to create another issue just to track that single item.

soltysh commented 7 years ago

I'll probably try to update the initial description so that it reflects changes introduced (planned as well) for CronJob related features.

idvoretskyi commented 6 years ago

@soltysh any progress with the feature description update? :)

Please, use the new template - https://github.com/kubernetes/features/blob/master/ISSUE_TEMPLATE.md

zacharysarah commented 6 years ago

@soltysh :wave: Please indicate in the 1.9 feature tracking board whether this feature needs documentation. If yes, please open a PR and add a link to the tracking spreadsheet. Thanks in advance!

janetkuo commented 6 years ago

@idvoretskyi since there's one feature (Ability to start CronJobs manually) we'll be trying to get into 1.9 release related to CronJobs, I'll add 1.9 milstone here

This specific feature won't be in 1.9. Shall we move the milestone to 1.10?