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

CronJob concept implies that CronJob can schedule one-shot tasks for a specific future date #27394

Closed
sftim opened this issue Apr 3, 2021 · 10 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/apps Categorizes an issue or PR as relevant to SIG Apps. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sftim
Copy link
Contributor

sftim commented Apr 3, 2021

This is a Bug Report

Problem:
The CronJob concept page mentions:

CronJobs can also schedule individual tasks for a specific time, such as scheduling a Job for when your cluster is likely to be idle.

This sounds like at, which can schedule one-shot tasks for a specific future date / datetime; however, that page strongly implies that CronJob does not in fact provide “run exactly once and never repeat” semantics.

Technically you could define a CronJob and a ServiceAccount and authnz rules that let the CronJob delete itself after it has successfully run once. I don't think we want to mention that bodge. I'd rather see an addon that gives you a OneShotScheduledJob CRD or similar.

Proposed Solution:

Remove or reword the text “CronJobs can also schedule individual tasks for a specific time, such as scheduling a Job for when your cluster is likely to be idle.”

Page to Update:

https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/

Additional Information:
/kind bug
/sig apps

@sftim sftim added the kind/bug Categorizes issue or PR as related to a bug. label Apr 3, 2021
@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 3, 2021
@sftim
Copy link
Contributor Author

sftim commented Apr 3, 2021

@kubernetes/sig-apps-misc could you confirm this and /triage accepted if you agree?

@sftim
Copy link
Contributor Author

sftim commented Apr 3, 2021

I logged this after adding feedback for the v1.21 release announcement: #27233 (comment)

@soltysh
Copy link
Contributor

soltysh commented Jun 15, 2021

@sftim yeah, I like your proposed wording, are you going to open a PR?
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 15, 2021
@sftim
Copy link
Contributor Author

sftim commented Jun 15, 2021

This issue is open for an interested contributor to work on. I already have some other PRs / work-in-progress that I'm going to focus on first.

@sftim
Copy link
Contributor Author

sftim commented Jun 15, 2021

The wording I suggested was:

CronJobs are meant for performing regular scheduled actions such as backups, report generation, and so on. Each of those tasks should be configured to recur indefinitely (for example: once a day / week / month); you can define the point in time within that interval when the job should start.

@soltysh
Copy link
Contributor

soltysh commented Jun 15, 2021

Lemme add that bit to #28229 where I'm updating CronJob related flag, in that case.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 13, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 13, 2021
@soltysh
Copy link
Contributor

soltysh commented Nov 9, 2021

This was fixed in #28229
/close

@k8s-ci-robot
Copy link
Contributor

@soltysh: Closing this issue.

In response to this:

This was fixed in #28229
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. sig/apps Categorizes an issue or PR as relevant to SIG Apps. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants