Merge pull request #30705 from jlbutler/merged-main-dev-1.23

Periodic integration branch sync for 1.23
This commit is contained in:
Kubernetes Prow Robot
2021-12-02 18:02:26 -08:00
committed by GitHub
89 changed files with 1488 additions and 509 deletions
@@ -250,7 +250,7 @@ back-off count is reset when a Job's Pod is deleted or successful without any
other Pods for the Job failing around that time.
{{< note >}}
If your job has `restartPolicy = "OnFailure"`, keep in mind that your container running the Job
If your job has `restartPolicy = "OnFailure"`, keep in mind that your Pod running the Job
will be terminated once the job backoff limit has been reached. This can make debugging the Job's executable more difficult. We suggest setting
`restartPolicy = "Never"` when debugging the Job or using a logging system to ensure output
from failed Jobs is not lost inadvertently.
@@ -346,6 +346,25 @@ If the field is set to `0`, the Job will be eligible to be automatically deleted
immediately after it finishes. If the field is unset, this Job won't be cleaned
up by the TTL controller after it finishes.
{{< note >}}
It is recommended to set `ttlSecondsAfterFinished` field because unmanaged jobs
(Jobs that you created directly, and not indirectly through other workload APIs
such as CronJob) have a default deletion
policy of `orphanDependents` causing Pods created by an unmanaged Job to be left around
after that Job is fully deleted.
Even though the {{< glossary_tooltip text="control plane" term_id="control-plane" >}} eventually
[garbage collects](/docs/concepts/workloads/pods/pod-lifecycle/#pod-garbage-collection)
the Pods from a deleted Job after they either fail or complete, sometimes those
lingering pods may cause cluster performance degradation or in worst case cause the
cluster to go offline due to this degradation.
You can use [LimitRanges](/docs/concepts/policy/limit-range/) and
[ResourceQuotas](/docs/concepts/policy/resource-quotas/) to place a
cap on the amount of resources that a particular namespace can
consume.
{{< /note >}}
## Job patterns
The Job object can be used to support reliable parallel execution of Pods. The Job object is not