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

Include CronJob timezone in kubectl output #1519

Closed
command-tab opened this issue Nov 17, 2023 · 4 comments · Fixed by kubernetes/kubernetes#122231
Closed

Include CronJob timezone in kubectl output #1519

command-tab opened this issue Nov 17, 2023 · 4 comments · Fixed by kubernetes/kubernetes#122231
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@command-tab
Copy link

Following the addition of CronJob timezone support, it would be very helpful to have those timezones displayed in the output of kubectl. Currently, listing CronJobs shows their schedule/cron expressions, but the timezone is absent.

What would you like to be added:

Either in the SCHEDULE column, or perhaps a separate column — whichever makes the most sense — include each CronJob's timezone.

Why is this needed:

Knowing the CronJob's timezone is equally as important as the cron expression itself. Absence of the timezone can very easily cause confusion about when the CronJob is expected to run versus when it will actually run.

@command-tab command-tab added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 17, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Nov 17, 2023
@ardaguclu
Copy link
Member

In which command's output?. Could you please check describe command for this resource. If timezone is not added there, I think, it is reasonable to add in describe.

@command-tab
Copy link
Author

kubectl get cronjob -n mynamespace currently returns something like the following:

NAME            SCHEDULE     SUSPEND   ACTIVE   LAST SCHEDULE   AGE
send-reminders  0 14 * * 5   False     0        5d22h           77d
update-users    0 8 * * *    False     0        4h8m            77d

Now that CronJobs support setting of timezones, it would be great if the kubectl output included that setting by default, since the timezone critically affects when the schedule (cron expression) occurs. I'm imagining output like this, which includes a new TIMEZONE column:

NAME            SCHEDULE     TIMEZONE     SUSPEND   ACTIVE   LAST SCHEDULE   AGE
send-reminders  0 14 * * 5   US/Pacific   False     0        5d22h           77d
update-users    0 8 * * *    UTC          False     0        4h8m            77d

@ardaguclu
Copy link
Member

/triage accepted
/priority backlog

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 8, 2023
@ardaguclu
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants