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

TimeZone support in CronJob #3140

Closed
12 of 13 tasks
soltysh opened this issue Jan 14, 2022 · 43 comments
Closed
12 of 13 tasks

TimeZone support in CronJob #3140

soltysh opened this issue Jan 14, 2022 · 43 comments
Labels
sig/apps Categorizes an issue or PR as relevant to SIG Apps. stage/stable Denotes an issue tracking an enhancement targeted for Stable/GA status

Comments

@soltysh
Copy link
Contributor

soltysh commented Jan 14, 2022

TimeZone support in CronJob

Please keep this description up to date. This will help the Enhancement Team to track the evolution of the enhancement efficiently.

@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jan 14, 2022
@soltysh
Copy link
Contributor Author

soltysh commented Jan 14, 2022

/sig apps

@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 14, 2022
@soltysh soltysh changed the title TimeZone support in CronJobs TimeZone support in CronJob Jan 14, 2022
@gracenng gracenng added this to the v1.24 milestone Jan 22, 2022
@gracenng gracenng added the tracked/yes Denotes an enhancement issue is actively being tracked by the Release Team label Jan 22, 2022
@Priyankasaggu11929
Copy link
Member

Priyankasaggu11929 commented Jan 24, 2022

Hello @soltysh 👋, 1.24 Enhancements team here.

Just checking in as we approach enhancements freeze on 18:00pm PT on Thursday Feb 3rd, 2022.

For note, This enhancement is targeting for stage alpha for 1.24 (correct me, if otherwise)

Here’s where this enhancement currently stands:

  • Updated KEP file using the latest template has been merged into the k/enhancements repo.
  • KEP status is marked as implementable for this release
  • KEP has a test plan section filled out.
  • KEP has up to date graduation criteria.
  • KEP has a production readiness review that has been completed and merged into k/enhancements.

Looks like for this one, we would just require having this KEP PR #3143 merged & that will mark all the above requirements.

At the moment, the status of this enhancement is marked as at-risk. Please keep the issue description up-to-date with appropriate stages as well. Thank you!

@soltysh
Copy link
Contributor Author

soltysh commented Feb 2, 2022

@Priyankasaggu11929 #3143 just merged, so I hope that satisfies all the requirements for inclusion.

@rhockenbury
Copy link

Thanks! I've moved this to tracked. All set for enhancement freeze. 👍

@rhockenbury rhockenbury added the stage/alpha Denotes an issue tracking an enhancement targeted for Alpha status label Feb 3, 2022
@mehabhalodiya
Copy link

Hi @soltysh 👋🏻 1.24 Docs shadow here.

This enhancement is marked as 'Needs Docs' for the 1.24 release.

Please follow the steps detailed in the documentation to open a PR against the dev-1.24 branch in the k/website repo. This PR can be just a placeholder at this time and must be created before Thu March 31, 11:59 PM PDT.

Also, if needed take a look at Documenting for a release to familiarize yourself with the docs requirement for the release.

Thanks!

@salaxander
Copy link

Hi @soltysh 👋

Checking in once more as we approach 1.24 code freeze at 01:00 UTC Wednesday 30th March 2022.

Please ensure the following items are completed:

  • All PRs to the Kubernetes repo that are related to your enhancement are linked in the above issue description (for tracking purposes).
  • All PRs are fully merged by the code freeze deadline.

It looks like we're waiting on this one to merge? -> kubernetes/kubernetes#108032

As always, we are here to help should questions come up.

Thanks!!

@soltysh
Copy link
Contributor Author

soltysh commented Mar 24, 2022

It looks like we're waiting on this one to merge? -> kubernetes/kubernetes#108032

correct, that's the only one we need.

@soltysh
Copy link
Contributor Author

soltysh commented Mar 28, 2022

docs placeholder opened in kubernetes/website#32577

@sftim
Copy link
Contributor

sftim commented Mar 29, 2022

When we document this, #3143 (comment) strongly suggests to me that we should document how to manage a custom timezone database (via a hostPath volume mount or similar), and we should do that unless we have a strong commitment from SIG Release about providing official container images for the controller manager that have the timezone data kept very current.

@knight42
Copy link
Member

knight42 commented Apr 7, 2022

@soltysh Hi! Have you been working on this? If not, I am interested in this feature and I would like to implement it!

@soltysh
Copy link
Contributor Author

soltysh commented Apr 8, 2022

@knight42 this merged as alpha in 1.24 see kubernetes/kubernetes#108032 and kubernetes/website#32577 We're planning to promote this further in the next releases.

@Priyankasaggu11929
Copy link
Member

/milestone clear
/tracked no

@k8s-ci-robot k8s-ci-robot removed this from the v1.24 milestone May 10, 2022
@Priyankasaggu11929 Priyankasaggu11929 added tracked/no Denotes an enhancement issue is NOT actively being tracked by the Release Team and removed tracked/yes Denotes an enhancement issue is actively being tracked by the Release Team labels May 10, 2022
@soltysh
Copy link
Contributor Author

soltysh commented Jun 8, 2022

/milestone v1.25
/stage beta

@k8s-ci-robot k8s-ci-robot added stage/beta Denotes an issue tracking an enhancement targeted for Beta status and removed stage/alpha Denotes an issue tracking an enhancement targeted for Alpha status labels Jun 8, 2022
@marosset
Copy link
Contributor

marosset commented Feb 7, 2023

With #3449 merged this enhancement will be tracked for v1.27
Thanks!

@marosset marosset added tracked/yes Denotes an enhancement issue is actively being tracked by the Release Team and removed tracked/no Denotes an enhancement issue is NOT actively being tracked by the Release Team labels Feb 7, 2023
@sftim
Copy link
Contributor

sftim commented Feb 21, 2023

The implementation of the CronJob API in Kubernetes 1.26 lets you set the .spec.schedule field to include a timezone; for example: CRON_TZ=UTC * * * * * or TZ=UTC * * * * *.

Do we want to make a stronger statement about this, now that we nearly have GA support for setting a timezone via the API? The other mechanism was never official. This feels like the right time to make it.

For example, we might want to block creates of CronJobs that set a schedule with TZ / CRON_TZ. Possibly behind an on-y-default, disable-if-you-must feature gate?

@soltysh
Copy link
Contributor Author

soltysh commented Feb 22, 2023

Do we want to make a stronger statement about this, now that we nearly have GA support for setting a timezone via the API? The other mechanism was never official. This feels like the right time to make it.

I'd wish, but my worry is that we might break users, I'll open a separate PR and let's see if api approvers are willing to accept that.

For example, we might want to block creates of CronJobs that set a schedule with TZ / CRON_TZ. Possibly behind an on-y-default, disable-if-you-must feature gate?

We would need to touch both creates, to ensure new cronjobs are w/o those, and also updates such that you can't add it, if it wasn't already there.

@sftim
Copy link
Contributor

sftim commented Feb 22, 2023

I guess, related thing: recommend a tool / script / whatever that converts to the new, GA way to use a timezone.

@soltysh
Copy link
Contributor Author

soltysh commented Feb 27, 2023

I guess, related thing: recommend a tool / script / whatever that converts to the new, GA way to use a timezone.

I'll be writing a blog post about the TZ GA, so I'll make sure to put something together, I think a simple one-liner that could handle that easily. Also, based on the discussion from the TZ/CRON_TZ PR (not opened yet) I'll add that information to that blog post as well.

@tavin
Copy link

tavin commented Feb 27, 2023

@soltysh I wonder if, in your blog post, you'd be able to touch upon a recommended migration path for users who are on e.g. v1.22 and cronjobber.hidde.co/v1alpha1/TZCronJob. I am not sure in which point release we should attempt switching or even if we should temporarily use this TZ/CRON_TZ schedule format. Also we are constrained by the default feature gates, if that makes any difference.

@soltysh
Copy link
Contributor Author

soltysh commented Feb 27, 2023

Good point, I'll have a look and see what's possible.

@LukeMwila
Copy link

Hi @soltysh, I’m reaching out from the 1.27 Release Docs team. This enhancement is marked as ‘Needs Docs’ for the 1.27 release.

Please follow the steps detailed in the documentation to open a PR against dev-1.27 branch in the k/website repo. This PR can be just a placeholder at this time, and must be created by March 16. For more information, please take a look at Documenting for a release to familiarize yourself with the documentation requirements for the release.

Please feel free to reach out with any questions. Thanks!

@shatoboar
Copy link

Hi @soltysh 👋,
Checking in as we approach 1.27 code freeze at 17:00 PDT on Tuesday 14th March 2023.
Please ensure the following items are completed:

  • All PRs to the Kubernetes repo that are related to your enhancement are linked in the above issue description (for tracking purposes).
  • All PRs are fully merged by the code freeze deadline.

Please let me know what other PRs in k/k I should be tracking for this KEP.
As always, we are here to help should questions come up. Thanks!

@Atharva-Shinde Atharva-Shinde removed this from the v1.27 milestone May 14, 2023
@Atharva-Shinde Atharva-Shinde removed tracked/yes Denotes an enhancement issue is actively being tracked by the Release Team lead-opted-in Denotes that an issue has been opted in to a release labels May 14, 2023
@dlipofsky
Copy link

Is there a way to see the timezone with kubectl ?
I don't see it today, even with kubectl get cronjobs -o wide.
My client is v1.27.2 although my server is only v1.26.10.
(I do see it with -o yaml or -o json but not in the tabular formats)

@AndrewSav
Copy link

@dlipofsky as far as I understand the -o switch is pretty flexible and you can format it the way you want with it. Try go-template mode for example, I'm pretty sure it will get you where you want, I'm a little bit less certain about custom-columns but seems plausible too.

@dlipofsky
Copy link

@AndrewSav, I was rather hoping it could be added as a standard feature, as it is just as important as the schedule string in knowing when something will actually run.

@AndrewSav
Copy link

@dlipofsky let's hope they add it, but it is understandable that they cannot add every single field someone finds useful

@sftim
Copy link
Contributor

sftim commented Nov 17, 2023

For showing timezone in kubectl for CronJobs: https://github.com/kubernetes/kubectl/issues/new/choose

@soltysh
Copy link
Contributor Author

soltysh commented Jan 16, 2024

This is all done
/close

@k8s-ci-robot
Copy link
Contributor

@soltysh: Closing this issue.

In response to this:

This is all done
/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
sig/apps Categorizes an issue or PR as relevant to SIG Apps. stage/stable Denotes an issue tracking an enhancement targeted for Stable/GA status
Projects
Status: Tracked
Archived in project
Development

No branches or pull requests