Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Job or CronJob for spark-dependencies #36

Closed
pavolloffay opened this issue Sep 27, 2017 · 7 comments
Closed

Job or CronJob for spark-dependencies #36

pavolloffay opened this issue Sep 27, 2017 · 7 comments

Comments

@pavolloffay
Copy link
Member

Create a job or cronJob for https://github.com/jaegertracing/spark-dependencies.

@pavolloffay pavolloffay changed the title Job or CronJob Job or CronJob for spark-dependencies Sep 27, 2017
@objectiser
Copy link
Contributor

What is the difference? Pros/Cons?

@pavolloffay
Copy link
Member Author

I don't know. But I have two requirements:

  • be able to run the job immediately with just kubectl -f
  • be able to schedule that job like a cron

@jpkrohling
Copy link
Collaborator

You either run it immediately (job), or you run it scheduled (cron job). You can't have both, AFAIK :)

Reference:
https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/
https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion

@pavolloffay
Copy link
Member Author

I am working on this.

I think we should go with cron job. For demo purposes scheduled time could be changed.

@pavolloffay
Copy link
Member Author

For demos the following command can be used:

kubectl run jaeger-spark-dependencies --env="STORAGE=cassandra" --env="CASSANDRA_CONTACT_POINTS=cassandra:9042"  --restart=Never --image=jaegertracing/spark-dependencies

It will create links for the current day.

--schedule="55 23 * * *" can be used to schedule it. It actually creates CronJob object.

I am wondering whether we want to create a template for CronJob or just add commands to the readme.

@objectiser
Copy link
Contributor

If the templates are going to become storage specific (for production) then might be worth just including it in the main template rather than having it on its own?
It then provides complete functionality in a single template - but depends if some users don't want it.

@pavolloffay
Copy link
Member Author

It then provides complete functionality in a single template - but depends if some users don't want it.

They could delete it after creating all objects, although a little bit inconvenient.

CronJob template is storage specific, although storage can be configured as env var. (I don't want to copy it for all backends.)

So we have 3 options:

  • readme
  • separate resource file
  • include it directly in prod template

I think my preference would be readme or directly in prod template (if we will have a separate template for all backends)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants