Improve CronJob page (#18554)

* Improve CronJob page

This PR adds a note about the special constraint on CronJob names. The
contstraint is not captured in the API specification or anywhere else to
my knownledge.

* Update content/en/docs/concepts/workloads/controllers/cron-jobs.md

Co-Authored-By: Tim Bannister <tim@scalefactory.com>

Co-authored-by: Tim Bannister <tim@scalefactory.com>
pull/18566/head
Qiming 2020-01-09 19:55:45 +08:00 committed by Kubernetes Prow Robot
parent c03b44bc04
commit 9351b160af
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,11 @@ on a given schedule, written in [Cron](https://en.wikipedia.org/wiki/Cron) forma
All **CronJob** `schedule:` times are based on the timezone of the master where the job is initiated.
{{< /note >}}
When creating the manifest for a CronJob resource, make sure the name you provide
is no longer than 52 characters. This is because the CronJob controller will automatically
append 11 characters to the job name provided and there is a constraint that the
maximum length of a Job name is no more than 63 characters.
For instructions on creating and working with cron jobs, and for an example of a spec file for a cron job, see [Running automated tasks with cron jobs](/docs/tasks/job/automated-tasks-with-cron-jobs).
{{% /capture %}}