-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Document timezone support for CronJob #32577
Conversation
👷 Deploy Preview for kubernetes-io-vnext-staging processing.
|
Welcome @deejross! |
/assign |
/sig apps |
/retitle Document timezone support for CronJob |
/assign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. Here's some early feedback that I hope is useful.
@@ -36,6 +36,8 @@ for parsing and calculating the next Job creation time. Any usage of it is not | |||
recommended in a production cluster. | |||
{{< /caution >}} | |||
|
|||
**ALPHA**: CronJob now supports a new `timeZone` field and requires the `CronJobTimeZone` featuregate to be enabled to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can omit this.
content/en/docs/reference/command-line-tools-reference/feature-gates.md
Outdated
Show resolved
Hide resolved
## TimeZone Support | ||
**ALPHA** as of 1.24 | ||
|
||
There is now a new `timeZone` field and requires the `CronJobTimeZone` featuregate to be enabled to use. It is an optional field that should be set either to nil or a non-empty string. The `timeZone` string value should be a valid time zone name. Please see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, the local time zone of kube-controller-manager is used. | ||
|
||
An external time zone database should be available for use. In the event that one is not available, one from the Go standard library will be embedded into the binaries. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd write it like this:
## TimeZone Support | |
**ALPHA** as of 1.24 | |
There is now a new `timeZone` field and requires the `CronJobTimeZone` featuregate to be enabled to use. It is an optional field that should be set either to nil or a non-empty string. The `timeZone` string value should be a valid time zone name. Please see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, the local time zone of kube-controller-manager is used. | |
An external time zone database should be available for use. In the event that one is not available, one from the Go standard library will be embedded into the binaries. | |
## Time zones | |
For CronJobs with no time zone specified, the kube-controller-manager interprets schedules relative to its local time zone. | |
{{< feature-state for_k8s_version="v1.24" state="alpha" >}} | |
If you enable the `CronJobTimeZone` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/), | |
you can specify a time zone for a CronJob (if you don't enable that feature gate, or if you are using a version of | |
Kubernetes that does not have experimental time zone support, all CronJobs in your cluster have an unspecified | |
timezone). | |
When you have the feature enabled, you can set `spec.timezone` to the name of a valid [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) name. For example, setting | |
`spec.timezone: "Etc/UTC"` instructs Kubernetes to interpret the schedule relative to Coordinated Universal Time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit, rest lgtm
|
||
There is now a new `timeZone` field and requires the `CronJobTimeZone` featuregate to be enabled to use. It is an optional field that should be set either to nil or a non-empty string. The `timeZone` string value should be a valid time zone name. Please see: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, the local time zone of kube-controller-manager is used. | ||
|
||
A time zone database from the Go standard library is included in the binaries and used as a fallback in case an external database is not available. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A time zone database from the Go standard library is included in the binaries and used as a fallback in case an external database is not available. | |
A time zone database from the Go standard library is included in the binaries and used as a fallback in case an external database is not available on the system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Markdown and text mostly LGTM, one nit.
content/en/docs/reference/command-line-tools-reference/feature-gates.md
Outdated
Show resolved
Hide resolved
/lgtm |
LGTM label has been added. Git tree hash: 209f5d90dca4bb69eb2a21df1057e8ce8ff83a87
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sftim, soltysh 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 |
Add documentation for:
[preview]