Skip to content

Commit 3aa8d6b

Browse files
authored
Merge pull request #30435 from ravisantoshgudimetla/psb
[docs]: Promote STS minReadySeconds to beta
2 parents 46b8ceb + 9ea79fa commit 3aa8d6b

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

content/en/docs/concepts/workloads/controllers/statefulset.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ spec:
7777
app: nginx # has to match .spec.template.metadata.labels
7878
serviceName: "nginx"
7979
replicas: 3 # by default is 1
80+
minReadySeconds: 10 # by default is 0
8081
template:
8182
metadata:
8283
labels:
@@ -112,9 +113,24 @@ In the above example:
112113
The name of a StatefulSet object must be a valid
113114
[DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
114115

115-
## Pod Selector
116+
### Pod Selector
116117

117-
You must set the `.spec.selector` field of a StatefulSet to match the labels of its `.spec.template.metadata.labels`. Prior to Kubernetes 1.8, the `.spec.selector` field was defaulted when omitted. In 1.8 and later versions, failing to specify a matching Pod Selector will result in a validation error during StatefulSet creation.
118+
You must set the `.spec.selector` field of a StatefulSet to match the labels of its `.spec.template.metadata.labels`. In 1.8 and later versions, failing to specify a matching Pod Selector will result in a validation error during StatefulSet creation.
119+
120+
### Volume Claim Templates
121+
122+
You can set the `.spec.volumeClaimTemplates` which can provide stable storage using [PersistentVolumes](/docs/concepts/storage/persistent-volumes/) provisioned by a PersistentVolume Provisioner.
123+
124+
125+
### Minimum ready seconds
126+
127+
{{< feature-state for_k8s_version="v1.23" state="beta" >}}
128+
129+
`.spec.minReadySeconds` is an optional field that specifies the minimum number of seconds for which a newly
130+
created Pod should be ready without any of its containers crashing, for it to be considered available.
131+
Please note that this feature is beta and enabled by default. Please opt out by unsetting the StatefulSetMinReadySeconds flag, if you don't
132+
want this feature to be enabled. This field defaults to 0 (the Pod will be considered
133+
available as soon as it is ready). To learn more about when a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
118134

119135
## Pod Identity
120136

@@ -284,16 +300,6 @@ After reverting the template, you must also delete any Pods that StatefulSet had
284300
already attempted to run with the bad configuration.
285301
StatefulSet will then begin to recreate the Pods using the reverted template.
286302

287-
### Minimum ready seconds
288-
289-
{{< feature-state for_k8s_version="v1.22" state="alpha" >}}
290-
291-
`.spec.minReadySeconds` is an optional field that specifies the minimum number of seconds for which a newly
292-
created Pod should be ready without any of its containers crashing, for it to be considered available.
293-
This defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when
294-
a Pod is considered ready, see [Container Probes](/docs/concepts/workloads/pods/pod-lifecycle/#container-probes).
295-
296-
Please note that this field only works if you enable the `StatefulSetMinReadySeconds` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
297303

298304
## {{% heading "whatsnext" %}}
299305

content/en/docs/reference/command-line-tools-reference/feature-gates.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ different Kubernetes components.
182182
| `ServiceLoadBalancerClass` | `true` | Beta | 1.22 | |
183183
| `SizeMemoryBackedVolumes` | `false` | Alpha | 1.20 | 1.21 |
184184
| `SizeMemoryBackedVolumes` | `true` | Beta | 1.22 | |
185-
| `StatefulSetMinReadySeconds` | `false` | Alpha | 1.22 | |
185+
| `StatefulSetMinReadySeconds` | `false` | Alpha | 1.22 | 1.22 |
186+
| `StatefulSetMinReadySeconds` | `true` | Beta | 1.23 | |
186187
| `StorageVersionAPI` | `false` | Alpha | 1.20 | |
187188
| `StorageVersionHash` | `false` | Alpha | 1.14 | 1.14 |
188189
| `StorageVersionHash` | `true` | Beta | 1.15 | |

0 commit comments

Comments
 (0)