Skip to content

Commit 41a8b15

Browse files
authored
Merge pull request #27488 from adtac/suspend-blog
blog: make minor corrections to upcoming SuspendJob post
2 parents 9dd42da + eb558e2 commit 41a8b15

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

content/en/blog/_posts/2021-04-12-introducing-suspended-jobs.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ layout: blog
88
**Author:** Adhityaa Chandrasekar (Google)
99

1010
[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/),
1212
[ReplicaSets](/docs/concepts/workloads/controllers/replicaset/),
1313
[StatefulSets](/docs/concepts/workloads/controllers/statefulset/), and
1414
[DaemonSets](/docs/concepts/workloads/controllers/daemonset/)
@@ -33,8 +33,8 @@ in order to use it.
3333

3434
## API changes
3535

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:
3838

3939
```yaml
4040
apiVersion: batch/v1
@@ -55,17 +55,17 @@ spec:
5555
```
5656
5757
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.
6161

6262
As another example, consider a Job that was created with the `suspend` field
6363
omitted. The Job controller will happily create Pods to work towards Job
6464
completion. However, before the Job completes, if I explicitly set the field to
6565
true with a Job update, the Job controller will terminate all active Pods that
6666
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)
6969
defined in the Pod spec will be honoured. Pods terminated this way will not be
7070
counted as failures by the Job controller.
7171

@@ -91,8 +91,8 @@ resources are cheaper at night than in the morning. If I have a long-running Job
9191
that takes multiple days to complete, being able to suspend the Job in the
9292
morning and then resume it in the evening every day can reduce costs.
9393

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.
9696

9797
## References and next steps
9898

@@ -101,9 +101,9 @@ the decisions we have taken, consider reading the [enhancement proposal](https:/
101101
There's more detail on suspending and resuming jobs in the documentation for [Job](/docs/concepts/workloads/controllers/job#suspending-a-job).
102102

103103
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).
107107
The SIG Apps community also [meets regularly](https://github.com/kubernetes/community/tree/master/sig-apps#meetings)
108108
and can be reached through [Slack or the mailing list](https://github.com/kubernetes/community/tree/master/sig-apps#contact).
109109
Barring any unexpected changes to the API, we intend to graduate the feature to

0 commit comments

Comments
 (0)