@@ -8,7 +8,7 @@ layout: blog
8
8
** Author:** Adhityaa Chandrasekar (Google)
9
9
10
10
[ Jobs] ( /docs/concepts/workloads/controllers/job/ ) are a crucial part of
11
- Kubernetes API. While other kinds of workloads such as [ Deployments] ( /docs/concepts/workloads/controllers/deployment/ ) ,
11
+ Kubernetes' API. While other kinds of workloads such as [ Deployments] ( /docs/concepts/workloads/controllers/deployment/ ) ,
12
12
[ ReplicaSets] ( /docs/concepts/workloads/controllers/replicaset/ ) ,
13
13
[ StatefulSets] ( /docs/concepts/workloads/controllers/statefulset/ ) , and
14
14
[ DaemonSets] ( /docs/concepts/workloads/controllers/daemonset/ )
@@ -33,8 +33,8 @@ in order to use it.
33
33
34
34
## API changes
35
35
36
- A new boolean field ` suspend ` is introduced in the Job spec API . Let's say I
37
- create the following Job:
36
+ We introduced a new boolean field ` suspend ` into the ` . spec` of Jobs . Let's say
37
+ I create the following Job:
38
38
39
39
``` yaml
40
40
apiVersion : batch/v1
@@ -55,17 +55,17 @@ spec:
55
55
` ` `
56
56
57
57
Jobs are not suspended by default, so I'm explicitly setting the ` suspend` field
58
- to true in the above Job spec . In the above example, the Job controller will
59
- refrain from creating Pods until I'm ready to start the Job, which I can do by
60
- updating the field to false.
58
+ to _true_ in the `.spec` of the above Job manifest . In the above example, the
59
+ Job controller will refrain from creating Pods until I'm ready to start the Job,
60
+ which I can do by updating `suspend` to false.
61
61
62
62
As another example, consider a Job that was created with the `suspend` field
63
63
omitted. The Job controller will happily create Pods to work towards Job
64
64
completion. However, before the Job completes, if I explicitly set the field to
65
65
true with a Job update, the Job controller will terminate all active Pods that
66
66
are running and will wait indefinitely for the flag to be flipped back to false.
67
- Pod termination is done by sending a SIGTERM signal to all active Pods; the
68
- [graceful termination period](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)
67
+ Typically, Pod termination is done by sending a SIGTERM signal to all container
68
+ processes in the Pod; the [graceful termination period](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)
69
69
defined in the Pod spec will be honoured. Pods terminated this way will not be
70
70
counted as failures by the Job controller.
71
71
@@ -91,8 +91,8 @@ resources are cheaper at night than in the morning. If I have a long-running Job
91
91
that takes multiple days to complete, being able to suspend the Job in the
92
92
morning and then resume it in the evening every day can reduce costs.
93
93
94
- Since this field is a part of the Job spec, CronJobs automatically get this
95
- feature for free too.
94
+ Since this field is a part of the Job spec, [ CronJobs](/docs/concepts/workloads/controllers/cron-jobs/)
95
+ automatically get this feature for free too.
96
96
97
97
# # References and next steps
98
98
@@ -101,9 +101,9 @@ the decisions we have taken, consider reading the [enhancement proposal](https:/
101
101
There's more detail on suspending and resuming jobs in the documentation for [Job](/docs/concepts/workloads/controllers/job#suspending-a-job).
102
102
103
103
As previously mentioned, this feature is currently in alpha and is available
104
- only if you explicitly opt-in through the `SuspendJob` feature gate. If this is
105
- a feature you're interested in, please consider testing suspended Jobs in your
106
- cluster and providing feedback. You can discuss this enhancement [on GitHub](https://github.com/kubernetes/enhancements/issues/2232).
104
+ only if you explicitly opt-in through the `SuspendJob` [ feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
105
+ If this is a feature you're interested in, please consider testing suspended
106
+ Jobs in your cluster and providing feedback. You can discuss this enhancement [on GitHub](https://github.com/kubernetes/enhancements/issues/2232).
107
107
The SIG Apps community also [meets regularly](https://github.com/kubernetes/community/tree/master/sig-apps#meetings)
108
108
and can be reached through [Slack or the mailing list](https://github.com/kubernetes/community/tree/master/sig-apps#contact).
109
109
Barring any unexpected changes to the API, we intend to graduate the feature to
0 commit comments