From f6c402a2bdd027f0eed30742858e8a67982574cc Mon Sep 17 00:00:00 2001
From: Jan-Philip Gehrcke <jgehrcke@googlemail.com>
Date: Wed, 15 Jan 2020 13:51:31 +0100
Subject: [PATCH] jobs: clarify that there is no `restartPolicy` for the job
 itself (#18605)

Sometimes, as it happened to me, a Pod's `restartPolicy`
is mistakenly taken as the corresponding Job's restart policy.

That was concluded before, here:
https://github.com/kubernetes/community/pull/583/files

The confusion happened here:
https://github.com/kubernetes/kubernetes/issues/30243
https://github.com/kubernetes/kubernetes/issues/43964

And here:
https://github.com/jaegertracing/jaeger-kubernetes/issues/32

This commit tries to clarify that there is no `restartPolicy` for
the job itself, and that using either of `backoffLimit` and
`activeDeadlineSeconds` may result in permanent failure.
---
 .../concepts/workloads/controllers/jobs-run-to-completion.md   | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/content/en/docs/concepts/workloads/controllers/jobs-run-to-completion.md b/content/en/docs/concepts/workloads/controllers/jobs-run-to-completion.md
index 0012832cef..70f5c7e0fa 100644
--- a/content/en/docs/concepts/workloads/controllers/jobs-run-to-completion.md
+++ b/content/en/docs/concepts/workloads/controllers/jobs-run-to-completion.md
@@ -265,6 +265,9 @@ spec:
 
 Note that both the Job spec and the [Pod template spec](/docs/concepts/workloads/pods/init-containers/#detailed-behavior) within the Job have an `activeDeadlineSeconds` field. Ensure that you set this field at the proper level.
 
+Keep in mind that the `restartPolicy` applies to the Pod, and not to the Job itself: there is no automatic Job restart once the Job status is `type: Failed`.
+That is, the Job termination mechanisms activated with `.spec.activeDeadlineSeconds` and `.spec.backoffLimit` result in a permanent Job failure that requires manual intervention to resolve.
+
 ## Clean Up Finished Jobs Automatically
 
 Finished Jobs are usually no longer needed in the system. Keeping them around in