Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button to manually trigger a cronjob #7968

Closed
taylorsmithgg opened this issue Dec 16, 2021 · 12 comments
Closed

Button to manually trigger a cronjob #7968

taylorsmithgg opened this issue Dec 16, 2021 · 12 comments
Labels
enhancement New feature or request

Comments

@taylorsmithgg
Copy link

Summary

It would be extremely useful to have the ability to manually trigger cronjobs after a sync is sucessful.

Motivation

Our developers are currently pushing cronjobs with argo, but do not have an immediate way to test them and verify. They have to either manually request our assistance to trigger them or wait until the schedule triggers.
Even if we allowed devs to delete/recreate or force, there are no patterns to also create a manual trigger in the process today.

Proposal

An additional button in the UI would be great.
We (admins) are currently using k9s to do this.
image

@taylorsmithgg taylorsmithgg added the enhancement New feature or request label Dec 16, 2021
@jannfis
Copy link
Member

jannfis commented Dec 20, 2021

I first thought this could have been implement as a resource action, such as the ones we already have for Deployment resources.

But to trigger a Cronjob in K8s requires creating a new Job resource, using the CronJob as a template, e.g. kubectl create job --from=cronjob/somecronjob new-job-name. Resource actions only let you modify the resource they are executed for, and do not allow you to create new resources, such as Jobs (for a good reason).

Due to this constraints, I'm not sure this is something we could/should implement in Argo CD. But I'm happy to pick up the discussion.

@taylorsmithgg
Copy link
Author

Just wanted to bump this for visibility and let you know this is still desperately needed.
Our current strategy is to push just the Job into a separate argo manifest.
As you can imagine, it's more tedious and less reliable than having an easy way to just trigger a cronjob.

@zen
Copy link

zen commented Mar 11, 2022

Yes, that would be very useful. Lens UI already has this implemented and it's very handy.

@taylorsmithgg
Copy link
Author

FYI in case anyone else crosses this bridge: argo workflows has a much better management interface and RBAC for jobs. It works out of the box and uses a separate permission set that adheres more closely to the use case.

@bygui86
Copy link

bygui86 commented Apr 21, 2022

@taylorsmithgg can you put here a link to that argo workflows feature?
I'm using full argo stack :) so it would be amazing to use what you describe!

@terrytangyuan
Copy link
Member

@bygui86
Copy link

bygui86 commented Apr 27, 2022

@terrytangyuan thanks.
So Argo Workflow is able to trigger a workflow (aka job) from a cron-workflow (aka cronjob) from the UI for example?

@terrytangyuan
Copy link
Member

CronWorkflow is not meant to be manually triggered. You can save the workflow spec into a WorkflowTemplate and submit it from the UI.

@bygui86
Copy link

bygui86 commented Apr 27, 2022

@terrytangyuan ok got it thanks :)
I don't have the possibility to convert all CronJobs into CronWorkflow, so Argo Workflows is a good alternative, but not replacing the feature request of this thread.

@jakestonelater
Copy link

An upvote for this feature
Yes, there are workarounds, but the ethos of ArgoCD is to add a convenience wrapper to Kubernetes, right?
I believe this feature would meet that criteria

@stephaneetje
Copy link

That feature would really be VERY useful

@crenshaw-dev
Copy link
Member

Closing in favor of duplicate #4116

I also like this idea. :-)

@crenshaw-dev crenshaw-dev closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants