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

Pod Design > Cron jobs > Last exercise with incorrect solution #174

Open
marcgarciajr opened this issue Feb 22, 2021 · 2 comments
Open

Pod Design > Cron jobs > Last exercise with incorrect solution #174

marcgarciajr opened this issue Feb 22, 2021 · 2 comments

Comments

@marcgarciajr
Copy link
Contributor

marcgarciajr commented Feb 22, 2021

Hi there,

First, congratulations on such an amazing compilation of exercises! Good job indeed!

I believe there is a mistake at the Cron jobs's last exercise. The solution should be to add startingDeadlineSeconds instead of activeDeadlineSeconds.

activeDeadlineSeconds is for Jobs as per Job Termination and Cleanup section.

startingDeadlineSeconds is for CronJobs, as per Starting Deadline section

@darkwraith840
Copy link

Hi, I started browsing issues section just to report about this issue with this question. Few further observations about this issue (the asked question is "to terminate the the cron job" if it takes more than 17 seconds to start execution after its schedule):

  1. startingDeadlineSeconds doesn't offer any cronjob termination. It just captures that specific job instantiation as failure. Infact, there is no such property for cron job to terminate the cron job itself.
  2. The question & the provided solution would have been correct if it is worded to terminate the job that is associated with the cronjob if it exceeds more than 17 seconds. Because each cronjob instantiation creates a new job and new pods within that job, hence terminating that new job would had made sense.

@dgkanatsios
Copy link
Owner

thanks! Feel free to create a PR with the suggested solution :)

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

No branches or pull requests

3 participants