You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Items marked with (R) are required *prior to targeting to a milestone / release*.
35
39
36
-
-[X] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
37
-
-[X] (R) KEP approvers have approved the KEP status as `implementable`
38
-
-[X] (R) Design details are appropriately documented
39
-
-[X] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input
40
-
-[X] (R) Graduation criteria is in place
41
-
-[X] (R) Production readiness review completed
42
-
-[X] (R) Production readiness review approved
43
-
-[X] "Implementation History" section is up-to-date for milestone
44
-
-[X] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
45
-
-[X] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
40
+
-[x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
41
+
-[x] (R) KEP approvers have approved the KEP status as `implementable`
42
+
-[x] (R) Design details are appropriately documented
43
+
-[x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
44
+
-[x] e2e Tests for all Beta API Operations (endpoints)
45
+
-[ ] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
46
+
-[ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
47
+
-[x] (R) Graduation criteria is in place
48
+
-[ ] (R) [all GA Endpoints](https://github.com/kubernetes/community/pull/1806) must be hit by [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
49
+
-[x] (R) Production readiness review completed
50
+
-[x] (R) Production readiness review approved
51
+
-[x] "Implementation History" section is up-to-date for milestone
52
+
-[x] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
53
+
-[x] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
@@ -149,7 +158,8 @@ This field is not valid for readiness probes. We will add validation to ensure
149
158
150
159
We expect that the `livenessProbe.terminationGracePeriodSeconds` (or
151
160
`startupProbe.*`) will not be greater than the pod-level
152
-
`terminationGracePeriodSeconds`, but we will not explicitly validate this.
161
+
`terminationGracePeriodSeconds`, but we will not explicitly validate this (we will
162
+
perform a soft validation and log when this condition occurs).
153
163
154
164
`initialDelaySeconds`is not relevant to this value; it indicates how long we
155
165
should wait before probing the container, but does not have any relation to how
@@ -168,6 +178,12 @@ down upon failure.
168
178
169
179
### Test Plan
170
180
181
+
[x] I/we understand the owners of the involved components may require updates to
182
+
existing tests to make this code solid enough prior to committing the changes necessary
183
+
to implement this enhancement.
184
+
185
+
#### Prerequisite testing updates
186
+
171
187
This change will be unit tested for the API changes and
172
188
backwards-compatibility.
173
189
@@ -181,6 +197,40 @@ large value, a probe fails, and with
181
197
`livenessProbe.terminationGracePeriodSeconds`set, the container terminates
182
198
quickly.
183
199
200
+
Update `test/e2e_node/eviction_test.go` to include pods with probes that have this feature
201
+
set to ensure the feature causes no issues with pod eviction and that the eviction
202
+
process doesn't interfere with the grace period for pods not being evicted.
203
+
204
+
#### Unit tests
205
+
206
+
Coverage prior to merging:
207
+
208
+
- `pkg/api/pod`: 2021-03-11 - 54.8% of statements
209
+
- `pkg/apis/core/validation`: 2021-03-11 - 81.0% of statements
210
+
- `pkg/kubelet/kuberuntime`: 2021-03-11 - 65.2% of statements
211
+
212
+
(these numbers were obtained by checking out the prior commit [`7b7c842eeccf5da90607abf6ec7c59935fe828ef`](https://github.com/kubernetes/kubernetes/tree/7b7c842eeccf5da90607abf6ec7c59935fe828ef) and running `go test -cover` against it)
213
+
214
+
Coverage after merging:
215
+
216
+
- `pkg/api/pod`: 57.0% of statements - increase of 2.2%
217
+
- `pkg/apis/core/validation`: 81.0% of statements - no change in coverage
218
+
- `pkg/kubelet/kuberuntime`: 65.0% of statements - decrease of 0.2%
219
+
220
+
(these numbers were obtained by checking out the commit after the code had merged [06e634e2162b16e2196395e3a232c01a558f0463](https://github.com/kubernetes/kubernetes/tree/06e634e2162b16e2196395e3a232c01a558f0463) and running `go test -cover` against it)
221
+
222
+
Unit buckets need to be added to `TestKillContainer` to test the [various scenarios and sequences](https://github.com/kubernetes/kubernetes/blob/02462739ca544dc61f4bf00a290d247c453030ef/pkg/kubelet/kuberuntime/kuberuntime_container.go#L683-L695) for setting the grace period from the various `terminationGracePeriodSeconds` values
223
+
224
+
#### Integration tests
225
+
226
+
- Set terminationGracePeriodSeconds for livenessProbe: [link to test coverage](https://storage.googleapis.com/k8s-triage/index.html?test=should%20override%20timeoutGracePeriodSeconds%20when%20LivenessProbe%20field%20is%20set%20%5BFeature%3AProbeTerminationGracePeriod%5D)
227
+
- Set terminationGracePeriodSeconds for startupProbe: [link to test coverage](https://storage.googleapis.com/k8s-triage/index.html?test=should%20override%20timeoutGracePeriodSeconds%20when%20StartupProbe%20field%20is%20set%20%5BFeature%3AProbeTerminationGracePeriod%5D)
228
+
229
+
#### e2e tests
230
+
231
+
- Set terminationGracePeriodSeconds for livenessProbe: [link to test coverage](https://storage.googleapis.com/k8s-triage/index.html?test=should%20override%20timeoutGracePeriodSeconds%20when%20LivenessProbe%20field%20is%20set%20%5BFeature%3AProbeTerminationGracePeriod%5D)
232
+
- Set terminationGracePeriodSeconds for startupProbe: [link to test coverage](https://storage.googleapis.com/k8s-triage/index.html?test=should%20override%20timeoutGracePeriodSeconds%20when%20StartupProbe%20field%20is%20set%20%5BFeature%3AProbeTerminationGracePeriod%5D)
233
+
184
234
### Graduation Criteria
185
235
186
236
#### Alpha (1.21)
@@ -196,14 +246,14 @@ quickly.
196
246
- Ensure that when feature gate is off in API server, probe-level
197
247
`TerminationGracePeriodSeconds`is blanked out.
198
248
- Add validation to ensure `terminationGracePeriodSeconds` is non-negative.
199
-
- Feature flag is defaulted to on after kube-apiserver is +2 versions of the
200
-
kubelet having the support (1.24).
249
+
- Feature flag is defaulted to on after kube-apiserver is +3 versions of the
250
+
kubelet having the support (1.25).
201
251
202
252
_Below graduation criteria are tentative._
203
253
204
-
#### Graduation (1.25)
254
+
#### Graduation (1.27)
205
255
206
-
- Feature flag is removed, feature is graduated (1.25).
256
+
- Feature flag is removed, feature is graduated (1.27).
207
257
208
258
### Upgrade / Downgrade Strategy
209
259
@@ -242,8 +292,8 @@ enhancement:
242
292
n-2 kubelet without this feature will default to the old behaviour, using the
243
293
pod-level `terminationGracePeriodSeconds`.
244
294
245
-
Feature gate will be removed from kubelet in 1.22, ensuring support for n-2
246
-
version skew on a 1.24+ API server.
295
+
Feature gate will be removed from kubelet in 1.25, ensuring support for n-2
296
+
version skew on a 1.27+ API server.
247
297
248
298
Only when feature gate is enabled for all components will we use the new field,
249
299
so we delay defaulting the feature flag on until then.
0 commit comments