Conversation
|
We would like to use this feature in a ESIP/OGC sprint activity end of June. Any chance of a review? cc: @rsignell-usgs |
|
Sorry, a bit swamped at the moment. I gave things a quick glance. My only question would be whether we want to handle all Job and CronJob stuff through the same user-facing API (so I don't want to be a bottleneck here, so I'm inclined to just trust your all's judgement. |
|
@TomAugspurger thanks so much for taking a look -- this is a small/short fuse project, so it's greatly appreciated! @yuvipanda, I know you are swamped too, but if you have 10 min, would value your opinion since you conceived this baby, right? 😸 |
|
@costrouc do you have any preference here. I can see pros/cons to both approaches. |
|
I lean toward what Tom has proposed with separate |
|
Thanks everyone for your feedback! I definitely see reasons why we would prefer to separate out these commands. To follow up on this proposed approach, I think it might be worthwhile to not only separate the user facing The a subset of possible user facing cli commands might look like:
I will push some of these proposed changes tomorrow. |
TomAugspurger
left a comment
There was a problem hiding this comment.
Thanks for updating @iameskild. Just one question about the docs. I only glanced through the rest, but IMO we can merge this once we've confirmed that the docs are correct.
|
This PR is ready for a review. I know this is more than initially scoped out but I believe this is a better and more comprehensive solution. The initial approach I took had the A side note about the
I added a few tests (more might be needed) and updated the docs. I have been manually testing many of the job and cronjob cli commands on k3d on my (apple intel) local machine and everything seems to work as expected. No changes to the jobs cli. Thanks for any feedback or suggestions you might have :) |
|
Sorry for the delay. I won't have a chance to fully review but this seems like a good improvement. I've invited @iameskild to be a maintainer. Feel free to merge whenever you're ready. |
|
Thanks a lot @TomAugspurger! @Adam-D-Lewis @dharhas @rsignell-usgs do any of you have any feedback before I merge this? |

EDIT:
See this comment for updated design approach.
@TomAugspurger
This PR allows users to specify the
--schedule="* * * * *"they want their job to run on. Specifying a schedule will create an underlyingCronJobresource as opposed to aJob. Otherwise, from the user's perspective the only difference is that a job runs once and cleans up, whereas a cronjob runs on a schedule and will have to be manually deleted it for it to stop.As I was working through this PR, I started to get the sense that creating a new model for
CronJobmight be worthwhile. It felt like I was shoehorning thescheduleinto place when in reality, and from the Kubernetes API point of view,CronJobscreateJobswhich in turn createPods. Perhaps it would be useful to reflect this relationship.I am submitting this PR based on the initial design proposal here: #38.
Lastly, I will need to wrap this up by adding some tests but I wanted to get your perspective on this before doing so.
Thanks again for all your feedback :)