Merge pull request #49327 from soltysh/tz_validation

Update information about CronJob's unsupported time zone field
pull/50034/head
Kubernetes Prow Robot 2025-03-05 09:43:46 -08:00 committed by GitHub
commit 2c5cb62757
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 8 deletions

View File

@ -60,7 +60,7 @@ The `.spec.schedule` field is required. The value of that field follows the [Cro
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
# │ │ │ │ │ OR sun, mon, tue, wed, thu, fri, sat
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
```
@ -192,13 +192,10 @@ A time zone database from the Go standard library is included in the binaries an
### Unsupported TimeZone specification
Specifying a timezone using `CRON_TZ` or `TZ` variables inside `.spec.schedule`
is **not officially supported** (and never has been).
Starting with Kubernetes 1.29 if you try to set a schedule that includes `TZ` or `CRON_TZ`
timezone specification, Kubernetes will fail to create the resource with a validation
error.
Updates to CronJobs already using `TZ` or `CRON_TZ` will continue to report a
[warning](/blog/2020/09/03/warnings/) to the client.
is **not officially supported** (and never has been). If you try to set a schedule
that includes `TZ` or `CRON_TZ` timezone specification, Kubernetes will fail to
create or update the resource with a validation error. You should specify time zones
using the [time zone field](#time-zones), instead.
### Modifying a CronJob