Skip to content

Commit a4723ec

Browse files
authored
Merge pull request kubernetes#4469 from atiratree/podhealthypolicy-ga
KEP-3017: Graduate UnhealthyPodEvictionPolicy for PDBs to stable
2 parents 95b875b + 7254756 commit a4723ec

File tree

3 files changed

+21
-86
lines changed

3 files changed

+21
-86
lines changed

keps/prod-readiness/sig-apps/3017.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ alpha:
33
approver: "@wojtek-t"
44
beta:
55
approver: "@wojtek-t"
6+
stable:
7+
approver: "@wojtek-t"

keps/sig-apps/3017-pod-healthy-policy-for-pdb/README.md

Lines changed: 16 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
5959

6060
- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
6161
- [x] (R) KEP approvers have approved the KEP status as `implementable`
62-
- [ ] (R) Design details are appropriately documented
63-
- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
62+
- [x] (R) Design details are appropriately documented
63+
- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
6464
- [ ] e2e Tests for all Beta API Operations (endpoints)
6565
- [ ] (R) Ensure GA e2e tests for meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
6666
- [ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
67-
- [ ] (R) Graduation criteria is in place
67+
- [x] (R) Graduation criteria is in place
6868
- [ ] (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)
6969
- [ ] (R) Production readiness review completed
7070
- [ ] (R) Production readiness review approved
71-
- [ ] "Implementation History" section is up-to-date for milestone
72-
- [ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
73-
- [ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
71+
- [x] "Implementation History" section is up-to-date for milestone
72+
- [x] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
73+
- [x] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
7474

7575
[kubernetes.io]: https://kubernetes.io/
7676
[kubernetes/enhancements]: https://git.k8s.io/enhancements
@@ -198,55 +198,18 @@ a `unhealthyPodEvictionPolicy`, and will not require the actual API to change.
198198

199199
### Test Plan
200200

201-
<!--
202-
**Note:** *Not required until targeted at a release.*
203-
The goal is to ensure that we don't accept enhancements with inadequate testing.
204-
All code is expected to have adequate tests (eventually with coverage
205-
expectations). Please adhere to the [Kubernetes testing guidelines][testing-guidelines]
206-
when drafting this test plan.
207-
[testing-guidelines]: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
208-
-->
209-
210201
[x] I/we understand the owners of the involved components may require updates to
211202
existing tests to make this code solid enough prior to committing the changes necessary
212203
to implement this enhancement.
213204

214205
##### Prerequisite testing updates
215206

216-
<!--
217-
Based on reviewers feedback describe what additional tests need to be added prior
218-
implementing this enhancement to ensure the enhancements have also solid foundations.
219-
-->
220-
221207
We assess that the eviction api has adequate test coverage for places which might be impacted by
222208
this enhancement. Thus, no additional tests prior implementing this enhancement
223209
are needed.
224210

225211
##### Unit tests
226212

227-
<!--
228-
In principle every added code should have complete unit test coverage, so providing
229-
the exact set of tests will not bring additional value.
230-
However, if complete unit test coverage is not possible, explain the reason of it
231-
together with explanation why this is acceptable.
232-
-->
233-
234-
Unit tests covering:
235-
- The current behavior stays unchanged when the policy is not specified.
236-
- Correct behavior for both policies in the eviction API.
237-
- Feature gate disablement.
238-
239-
<!--
240-
Additionally, for Alpha try to enumerate the core package you will be touching
241-
to implement this enhancement and provide the current unit coverage for those
242-
in the form of:
243-
- <package>: <date> - <current test coverage>
244-
The data can be easily read from:
245-
https://testgrid.k8s.io/sig-testing-canaries#ci-kubernetes-coverage-unit
246-
This can inform certain test coverage improvements that we want to do before
247-
extending the production code to implement this enhancement.
248-
-->
249-
250213
The core packages (with their unit test coverage) which are going to be modified during the implementation:
251214
- `k8s.io/kubernetes/pkg/apis/policy/validation`: `5 October 2022` - `93%` <!--(validation of the PodDisruptionBudget configuration with regard to the unhealthyPodEvictionPolicy)-->
252215
- `k8s.io/kubernetes/pkg/apis/policy/v1`: `5 October 2022` - `60%` <!--(extension of PodDisruptionBudgetSpec)-->
@@ -267,21 +230,13 @@ Integration tests covering:
267230
- Correct behavior for both policies in the eviction API.
268231
- Feature gate disablement.
269232

270-
271-
<!--
272-
This question should be filled when targeting a release.
273-
For Alpha, describe what tests will be added to ensure proper quality of the enhancement.
274-
For Beta and GA, add links to added tests together with links to k8s-triage for those tests:
275-
https://storage.googleapis.com/k8s-triage/index.html
276-
277-
- <test>: <link to test coverage>
278-
-->
279-
280233
[TestEvictionWithUnhealthyPodEvictionPolicy](https://github.com/kubernetes/kubernetes/blob/c8010537913422cc221cdd784936ff99817f621c/test/integration/evictions/evictions_test.go#L417): https://storage.googleapis.com/k8s-triage/index.html?test=UnhealthyPodEvictionPolicy
281234

282235
##### e2e tests
283236

284-
Verify passing existing E2E and conformance tests for PDBs and Eviction.
237+
Introduce tests covering:
238+
- Create a Deployment and a PDB with IfHealthyBudget policy and check that evictions work accordingly
239+
- Create a Deployment and a PDB with AlwaysAllow policy and check that evictions work accordingly
285240

286241
<!--
287242
This question should be filled when targeting a release.
@@ -294,7 +249,7 @@ We expect no non-infra related flakes in the last month as a GA graduation crite
294249
- <test>: <link to test coverage>
295250
-->
296251

297-
252+
TBD
298253

299254
### Graduation Criteria
300255

@@ -316,6 +271,7 @@ We expect no non-infra related flakes in the last month as a GA graduation crite
316271

317272
- Every bug report is fixed.
318273
- Introduce E2E tests for this field and confirm their stability.
274+
- Verify existing E2E and conformance tests for PDBs and Eviction.
319275
- The eviction API ignores the feature gate.
320276

321277
#### Deprecation
@@ -340,12 +296,6 @@ This feature doesn't depend on the version for nodes.
340296
- Feature gate name: PDBUnhealthyPodEvictionPolicy
341297
- Components depending on the feature gate:
342298
- kube-apiserver
343-
- [ ] Other
344-
- Describe the mechanism:
345-
- Will enabling / disabling the feature require downtime of the control
346-
plane?
347-
- Will enabling / disabling the feature require downtime or reprovisioning
348-
of a node?
349299

350300
###### Does enabling the feature change any default behavior?
351301

@@ -394,8 +344,7 @@ A manual test was performed, as follows:
394344
8. Verify that eviction of pods for Deployment A and StatefulSet B use the default behavior.
395345
Verify that the `AlwaysAllow` UnhealthyPodEvictionPolicy can be set again to a PDB of Deployment A and test the eviction behavior
396346

397-
TODO:
398-
A manual test will be performed, as follows:
347+
A manual test was performed, as follows:
399348

400349
1. Create a cluster in 1.26.
401350
2. Upgrade to 1.27.
@@ -482,41 +431,25 @@ No
482431

483432
### Troubleshooting
484433

485-
<!--
486-
This section must be completed when targeting beta to a release.
487-
488-
The Troubleshooting section currently serves the `Playbook` role. We may consider
489-
splitting it into a dedicated `Playbook` document (potentially with some monitoring
490-
details). For now, we leave it here.
491-
-->
492-
493434
###### How does this feature react if the API server and/or etcd is unavailable?
494435

495436
No change from the existing behavior of the eviction API.
496437

497438
###### What are other known failure modes?
498439

499-
<!--
500-
For each of them, fill in the following information by copying the below template:
501-
- [Failure mode brief description]
502-
- Detection: How can it be detected via metrics? Stated another way:
503-
how can an operator troubleshoot without logging into a master or worker node?
504-
- Mitigations: What can be done to stop the bleeding, especially for already
505-
running user workloads?
506-
- Diagnostics: What are the useful log messages and their required logging
507-
levels that could help debug the issue?
508-
Not required until feature graduated to beta.
509-
- Testing: Are there any tests for failure mode? If not, describe why.
510-
-->
440+
None.
511441

512442
###### What steps should be taken if SLOs are not being met to determine the problem?
513443

444+
N/A.
445+
514446
## Implementation History
515447

516448
- 2021-10-24: Proposed KEP for adding the new behavior in alpha status in 1.24.
517449
- 2022-11-11: Initial alpha implementation merged into 1.26
518450
- 2022-12-07: KEP rewritten to match the implementation (PodHealthyPolicy was renamed to UnhealthyPodEvictionPolicy)
519451
- 2023-02-06: Update for beta promotion
452+
- 2024-01-30: Update for stable promotion
520453

521454
## Drawbacks
522455

keps/sig-apps/3017-pod-healthy-policy-for-pdb/kep.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ approvers:
2424
see-also:
2525
replaces:
2626

27-
stage: beta
27+
stage: stable
2828

29-
latest-milestone: "v1.27"
29+
latest-milestone: "v1.30"
3030

3131
# The milestone at which this feature was, or is targeted to be, at each stage.
3232
milestone:
3333
alpha: "v1.26"
3434
beta: "v1.27"
35-
stable: "v1.28"
35+
stable: "v1.30"
3636

3737
# The following PRR answers are required at alpha release
3838
# List the feature gate name and the components for which it must be enabled

0 commit comments

Comments
 (0)