From 21f3345681f8fb7423859c0735b9886ee267c8e2 Mon Sep 17 00:00:00 2001 From: Sreeram Date: Thu, 6 Feb 2025 19:42:52 +0530 Subject: [PATCH 1/2] KEP 4818: Promote zero value for Pod Lifecycle Sleep action to beta --- keps/prod-readiness/sig-node/4818.yaml | 4 +- .../README.md | 143 +++--------------- .../kep.yaml | 7 +- 3 files changed, 24 insertions(+), 130 deletions(-) diff --git a/keps/prod-readiness/sig-node/4818.yaml b/keps/prod-readiness/sig-node/4818.yaml index 4635fa8e138..55bb96713d7 100644 --- a/keps/prod-readiness/sig-node/4818.yaml +++ b/keps/prod-readiness/sig-node/4818.yaml @@ -1,3 +1,5 @@ kep-number: 4818 alpha: - approver: "@wojtek-t" \ No newline at end of file + approver: "@wojtek-t" +beta: + approver: "" \ No newline at end of file diff --git a/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/README.md b/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/README.md index a327113e5ac..4341e3d494f 100644 --- a/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/README.md +++ b/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/README.md @@ -1,75 +1,5 @@ - # KEP-4818: Allow zero value for Sleep Action of PreStop Hook - - - [Release Signoff Checklist](#release-signoff-checklist) - [Summary](#summary) @@ -110,26 +40,12 @@ tags, and then generate with `hack/update-toc.sh`. ## Release Signoff Checklist - - Items marked with (R) are required *prior to targeting to a milestone / release*. -- [ ] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR) -- [ ] (R) KEP approvers have approved the KEP status as `implementable` -- [ ] (R) Design details are appropriately documented -- [ ] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors) +- [x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR) +- [x] (R) KEP approvers have approved the KEP status as `implementable` +- [x] (R) Design details are appropriately documented +- [x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors) - [ ] e2e Tests for all Beta API Operations (endpoints) - [ ] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md) - [ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free @@ -231,13 +147,6 @@ As a Kubernetes user, I want to to be able to have a PreStop hook defined in my ### Notes/Constraints/Caveats (Optional) - - ### Risks and Mitigations The change is opt-in, since it requires configuring a PreStop hook with sleep action of 0 second duration. So there is no risk beyond the upgrade/downgrade risks which are addressed in the Proposal section. @@ -248,17 +157,6 @@ Refer to the Proposal section. ### Test Plan - - [x] I/we understand the owners of the involved components may require updates to existing tests to make this code solid enough prior to committing the changes necessary to implement this enhancement. @@ -272,25 +170,6 @@ implementing this enhancement to ensure the enhancements have also solid foundat ##### Unit tests - - - - Alpha: - Test that the runSleepHandler function returns immediately when given a duration of zero. @@ -298,6 +177,9 @@ Alpha: - Test that the validation fails when given a zero duration with the feature gate disabled. - Test that the validation returns the appropriate error messages when given an invalid duration value (e.g., a negative value) with the feature gate disabled and enabled. - Unit tests for testing the disabling of the feature gate after it was enabled and the feature was used. +- Unit tests for pod with zero grace period duration and zero sleep duration with zero value enabled. +- Unit test for pod with nil grace period with zero value disabled +- Unit test for pod with nil grace period with zero value enabled Current coverages: @@ -342,6 +224,12 @@ Basic functionality - Delete the pod and observe the time it takes for the container to terminate. - Verify that the container terminates immediately without sleeping. +Additional e2e tests for beta: + - Test that pods with sleep value of 0 in PreStop hook can be created + - Test that pods with sleep value of 0 in PostStart hook can be created + - Test that pods with sleep value of 0 in PreStop hook can be updated + - Test that pods with sleep value of 0 in PostStart hook can be updated + ### Graduation Criteria #### Alpha @@ -350,7 +238,7 @@ Basic functionality #### Beta - Gather feedback from developers and surveys -- Additional e2e tests are completed (if needed) +- Additional e2e tests are completed - No trouble reports from alpha release #### GA @@ -565,6 +453,9 @@ Major milestones might include: - when the KEP was retired or superseded --> +- 2024-09-26: Alpha KEP PR opened for v1.32 +- 2025-02-06: KEP updated targeting to beta in v1.33 + ## Drawbacks N/A diff --git a/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/kep.yaml b/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/kep.yaml index 91438342170..f8cf907acb4 100755 --- a/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/kep.yaml +++ b/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/kep.yaml @@ -9,19 +9,20 @@ creation-date: "2024-09-16" reviewers: - "@kannon92" + - "@ffromani" approvers: - "@SergeyKanzhelev" see-also: - "/keps/sig-node/3960-pod-lifecycle-sleep-action" -stage: alpha +stage: beta -latest-milestone: "v1.32" +latest-milestone: "v1.33" milestone: alpha: "v1.32" - beta: "" + beta: "v1.33" stable: "" feature-gates: From 914315bbf0bb968259a8001e3f4a36a36e5df4d1 Mon Sep 17 00:00:00 2001 From: Sreeram Date: Fri, 7 Feb 2025 15:24:27 +0530 Subject: [PATCH 2/2] Added PRR approver and fixed implementation history --- keps/prod-readiness/sig-node/4818.yaml | 2 +- .../README.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/keps/prod-readiness/sig-node/4818.yaml b/keps/prod-readiness/sig-node/4818.yaml index 55bb96713d7..123ace94b9b 100644 --- a/keps/prod-readiness/sig-node/4818.yaml +++ b/keps/prod-readiness/sig-node/4818.yaml @@ -2,4 +2,4 @@ kep-number: 4818 alpha: approver: "@wojtek-t" beta: - approver: "" \ No newline at end of file + approver: "@wojtek-t" \ No newline at end of file diff --git a/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/README.md b/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/README.md index 4341e3d494f..bfa1ce71add 100644 --- a/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/README.md +++ b/keps/sig-node/4818-allow-zero-value-for-sleep-action-of-prestop-hook/README.md @@ -453,7 +453,11 @@ Major milestones might include: - when the KEP was retired or superseded --> -- 2024-09-26: Alpha KEP PR opened for v1.32 +- 2024-09-16: Alpha KEP PR opened for v1.32 +- 2024-10-03: Summary, Motivation and Proposal sections merged +- 2024-09-03: [Alpha code implementation PR](https://github.com/kubernetes/kubernetes/pull/127094) opened +- 2024-11-01: Alpha code PR merged +- 2024-12-11: Kubernetes v1.32 release with PodLifecycleSleepActionAllowZero in alpha stage - 2025-02-06: KEP updated targeting to beta in v1.33 ## Drawbacks