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

Add warning about using unsupported CRON_TZ #30509

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

soltysh
Copy link
Contributor

@soltysh soltysh commented Nov 16, 2021

This is fixing a mistake that was introduced during bumping an internal library.
More information and pointers to sig-apps discussion from yesterday are in
https://groups.google.com/g/kubernetes-sig-apps/c/-hohVua2JO4/m/31SJODnWAgAJ

/assign @atiratree

@k8s-ci-robot k8s-ci-robot added this to the 1.23 milestone Nov 16, 2021
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 16, 2021
@netlify
Copy link

netlify bot commented Nov 16, 2021

👷 Deploy Preview for kubernetes-io-vnext-staging processing.

🔨 Explore the source changes: 9a441b0

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/6193d6433b458c00074fd618

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. language/en Issues or PRs related to English language labels Nov 16, 2021
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Nov 16, 2021
@sftim
Copy link
Contributor

sftim commented Nov 16, 2021

/sig apps

This definitely needs technical review from the relevant SIG.

@k8s-ci-robot k8s-ci-robot added the sig/apps Categorizes an issue or PR as relevant to SIG Apps. label Nov 16, 2021
sftim
sftim previously requested changes Nov 16, 2021
Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove or reword the example:

`CRON_TZ=UTC 0 0 13 * 5`

(see the heading Cron schedule syntax)

@soltysh soltysh changed the base branch from dev-1.23 to main November 16, 2021 16:17
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 16, 2021
@sftim
Copy link
Contributor

sftim commented Nov 16, 2021

If we document for v1.23 that it's not supported, we should also update the docs for v1.22 in some way.

Alternatively, we apply this change to the main branch (currently v1.22)

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 16, 2021
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 16, 2021
@soltysh
Copy link
Contributor Author

soltysh commented Nov 16, 2021

If we document for v1.23 that it's not supported, we should also update the docs for v1.22 in some way.

Correct, it's for both 1.22 and 1.23

@soltysh
Copy link
Contributor Author

soltysh commented Nov 16, 2021

Alternatively, we apply this change to the main branch (currently v1.22)

Yup, did that after recommendation from @reylejano

@netlify
Copy link

netlify bot commented Nov 16, 2021

✔️ Deploy Preview for kubernetes-io-main-staging ready!

🔨 Explore the source changes: 0770500

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/6193d9c7c8e279000769e544

😎 Browse the preview: https://deploy-preview-30509--kubernetes-io-main-staging.netlify.app

The [v1 CronJob API](/docs/reference/kubernetes-api/workload-resources/cron-job-v1/)
does not officially support setting timezone as explained above.

Setting variables such as `CRON_TZ` or `TZ is not officially supported by the Kubernetes project.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown nit

Suggested change
Setting variables such as `CRON_TZ` or `TZ is not officially supported by the Kubernetes project.
Setting variables such as `CRON_TZ` or `TZ` is not officially supported by the Kubernetes project.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@sftim
Copy link
Contributor

sftim commented Nov 16, 2021

In effect, this reverts PR #29455

@netlify
Copy link

netlify bot commented Nov 16, 2021

✔️ Deploy Preview for kubernetes-io-main-staging ready!

🔨 Explore the source changes: b5e83e8

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/6193de7236a01d00087c768b

😎 Browse the preview: https://deploy-preview-30509--kubernetes-io-main-staging.netlify.app

@soltysh
Copy link
Contributor Author

soltysh commented Nov 16, 2021

In effect, this reverts PR #29455

Correct.

@@ -28,6 +26,16 @@ containers, the timezone set for the kube-controller-manager container determine
that the cron job controller uses.
{{< /caution >}}

{{< caution >}}
The [v1 CronJob API](/docs/reference/kubernetes-api/workload-resources/cron-job-v1/)
does not officially support setting timezone as explained above.
Copy link
Member

@BenTheElder BenTheElder Nov 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"as explained above" ?
edit: maybe I'm misreading this, but it seems like we removed the explanation of setting this?
edit2: and actually explain below 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is OK to merge with the existing wording but a follow-up to clarify would be welcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above is a caution about cronjob using timezone from kube-controller-manager's host, that's what I've meant with it

@sftim
Copy link
Contributor

sftim commented Nov 16, 2021

If we want a short URL like https://k8s.io/cron-tz-environment then that's also available (log a feature request and we can get onto it).

@soltysh
Copy link
Contributor Author

soltysh commented Nov 17, 2021

@sftim I think we'll be fine with the current link https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ I'll reach out to you on slack about publishing a blog post describing this entire situation.

@soltysh
Copy link
Contributor Author

soltysh commented Nov 17, 2021

If there is no further feedback, I'd appreciate getting this one merged, I have 1.22 (kubernetes/kubernetes#106487) in the queue already

@sftim
Copy link
Contributor

sftim commented Nov 17, 2021

On behalf of SIG Docs, I'd like SIG Node Apps to provide a tech review here. @soltysh I'm afraid that as the author you can't review your own work.

@atiratree
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 17, 2021
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7dfe95f612cf88fa30e87108f510fcffba0b30fa

@sftim
Copy link
Contributor

sftim commented Nov 17, 2021

Thanks @atiratree - I'm assuming your LGTM was to be counted as a tech review for SIG Apps?

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sftim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2021
@k8s-ci-robot k8s-ci-robot merged commit 0aa00b6 into kubernetes:main Nov 17, 2021
@atiratree
Copy link
Member

@sftim yes, thanks for the approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants