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
@@ -115,18 +115,18 @@ checklist items _must_ be updated for the enhancement to be released.
115
115
116
116
Items marked with (R) are required *prior to targeting to a milestone / release*.
117
117
118
-
-[] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
119
-
-[] (R) KEP approvers have approved the KEP status as `implementable`
120
-
-[] (R) Design details are appropriately documented
121
-
-[] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
122
-
-[] e2e Tests for all Beta API Operations (endpoints)
118
+
-[x] (R) Enhancement issue in release milestone, which links to KEP dir in [kubernetes/enhancements] (not the initial KEP PR)
119
+
-[x] (R) KEP approvers have approved the KEP status as `implementable`
120
+
-[x] (R) Design details are appropriately documented
121
+
-[x] (R) Test plan is in place, giving consideration to SIG Architecture and SIG Testing input (including test refactors)
122
+
-[x] e2e Tests for all Beta API Operations (endpoints)
123
123
-[ ] (R) Ensure GA e2e tests meet requirements for [Conformance Tests](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/conformance-tests.md)
124
124
-[ ] (R) Minimum Two Week Window for GA e2e tests to prove flake free
125
-
-[] (R) Graduation criteria is in place
125
+
-[x] (R) Graduation criteria is in place
126
126
-[ ] (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)
127
-
-[] (R) Production readiness review completed
128
-
-[] (R) Production readiness review approved
129
-
-[] "Implementation History" section is up-to-date for milestone
127
+
-[x] (R) Production readiness review completed
128
+
-[x] (R) Production readiness review approved
129
+
-[x] "Implementation History" section is up-to-date for milestone
130
130
-[ ] User-facing documentation has been created in [kubernetes/website], for publication to [kubernetes.io]
131
131
-[ ] Supporting documentation—e.g., additional design documents, links to mailing list discussions/SIG meetings, relevant PRs/issues, release notes
132
132
@@ -603,6 +603,11 @@ are not restarted and the pod fails.
603
603
- Verify that PodFailurePolicy works with the restartPolicyRules; containers restarted
604
604
by the restartPolicyRules should not fail the Pod and trigger PodFailurePolicy.
@@ -690,6 +695,9 @@ pod restart policy, container restart policy, and container restart rules.
690
695
- Container restart policy functionality running behind feature flag
691
696
for at least one release.
692
697
- Container restart policy runs well with Job controller.
698
+
- All monitoring requirements completed.
699
+
- All testing requirements completed.
700
+
- All known pre-release issues and gaps resolved.
693
701
694
702
#### GA
695
703
@@ -801,10 +809,11 @@ feature.
801
809
NOTE: Also set `disable-supported` to `true` or `false` in `kep.yaml`.
802
810
-->
803
811
804
-
Yes. To roll back, the feature gate should be disabled in the API server and
805
-
kubelets, and components should be restarted. If a Pod was created with the
806
-
restartPolicyRules field while the gate was enabled, those rules will be ignored by
807
-
kubelets once the feature is disabled.
812
+
Yes. To roll back, the feature gate should be disabled in the API server and kubelets, and they should be restarted.
813
+
814
+
If a Pod was created with the container-level restart policy and/or restartPolicyRules while the feature gate was enabled, but later the feature gate is disabled, those container-level restart policy and rules will persist, but they will have no effect and will be ignored by the kubelet.
815
+
816
+
Once the feature is disabled, pods cannot be created with container-level restart policy except Sidecar init containers with restart policy Always. Pods created with restart policy rules will be silently dropped.
808
817
809
818
###### What happens if we reenable the feature if it was previously rolled back?
810
819
@@ -827,14 +836,11 @@ You can take a look at one potential example of such test in:
- Unit test for the API's validation with the feature enabled and disabled.
831
-
- Unit test for the kubelet with the feature enabled and disabled.
832
-
- Unit test for API on the new field for the Pod API. First enable
833
-
the feature gate, create a Pod with a container including restartRules,
834
-
validation should pass and the Pod API should match the expected result.
835
-
Second, disable the feature gate, validate the Pod API should still pass
836
-
and it should match the expected result. Lastly, re-enable the feature
837
-
gate, validate the Pod API should pass and it should match the expected result.
839
+
- Unit test for the API's validation with the feature enabled and disabled:
840
+
- See https://github.com/kubernetes/kubernetes/blob/9630ab9581afbac9835d53f9e620a1240a1d2d91/pkg/apis/core/validation/validation_test.go#L29065 and https://github.com/kubernetes/kubernetes/blob/9630ab9581afbac9835d53f9e620a1240a1d2d91/pkg/apis/core/validation/validation_test.go#L9357
841
+
- Unit test for the kubelet with the feature enabled
842
+
- See https://github.com/kubernetes/kubernetes/blob/9630ab9581afbac9835d53f9e620a1240a1d2d91/pkg/kubelet/kubelet_test.go#L2476, https://github.com/kubernetes/kubernetes/blob/9630ab9581afbac9835d53f9e620a1240a1d2d91/pkg/kubelet/kubelet_pods_test.go#L3302, and https://github.com/kubernetes/kubernetes/blob/9630ab9581afbac9835d53f9e620a1240a1d2d91/pkg/kubelet/kuberuntime/kuberuntime_manager_test.go#L2112
843
+
- Unit test for API on the new field for the Pod API. First enable the feature gate, create a Pod with a container including restartRules, validation should pass and the Pod API should match the expected result. Second, disable the feature gate, validate the Pod API should still pass and it should match the expected result. Lastly, re-enable the feature gate, validate the Pod API should pass and it should match the expected result. This is achieved by the ValidationOptions, if the podSpec contains restart policy, or the feature gate is enabled, then the AllowContainerRestartPolicyRules would be true, see https://github.com/kubernetes/kubernetes/blob/9630ab9581afbac9835d53f9e620a1240a1d2d91/pkg/api/pod/util_test.go#L5965
838
844
839
845
### Rollout, Upgrade and Rollback Planning
840
846
@@ -870,17 +876,14 @@ Repeated restart of container or pods.
870
876
871
877
###### Were upgrade and rollback tested? Was the upgrade->downgrade->upgrade path tested?
872
878
873
-
<!--
874
-
Describe manual testing that was done and the outcomes.
875
-
Longer term, we may want to require automated upgrade/rollback tests, but we
876
-
are missing a bunch of machinery and tooling and can't do that now.
877
-
-->
879
+
Manual testing was performed to verify the upgrade and rollback paths.
880
+
- **Upgrade:** A cluster with the feature disabled was upgraded to a version with the feature enabled. Pods with container-level `restartPolicy` and `restartPolicyRules` were deployed and observed to behave as expected.
881
+
- **Rollback:** A cluster with the feature enabled was rolled back to a version with the feature disabled. Previously created pods continued to run and have the container-level `restartPolicy` and `restartPolicyRules`, but these fields were ignored. New Pods cannot be created with container-level restartPolicy, and `restartPolicyRules` are dropped silently.
882
+
- **Upgrade->Downgrade->Upgrade:** This path was tested by performing the above steps sequentially. The feature behaved as expected at each stage, with `restartPolicyRules` being respected when the feature was enabled and ignored when disabled.
878
883
879
884
###### Is the rollout accompanied by any deprecations and/or removals of features, APIs, fields of API types, flags, etc.?
880
885
881
-
<!--
882
-
Even if applying deprecation policies, they may still surprise some users.
883
-
-->
886
+
No.
884
887
885
888
### Monitoring Requirements
886
889
@@ -893,11 +896,9 @@ previous answers based on experience in the field.
893
896
894
897
###### How can an operator determine if the feature is in use by workloads?
895
898
896
-
<!--
897
-
Ideally, this should be a metric. Operations against the Kubernetes API (e.g.,
898
-
checking if there are objects with field X set) may be a last resort. Avoid
899
-
logs or events for this purpose.
900
-
-->
899
+
Operators can determine if the feature is in use by checking the Pod spec for the presence of the `restartPolicyRules` field within container definitions. Operators can track the `ContainerStatus.RestartCount` to see how many times the container has restarted.
900
+
901
+
Additionally, monitoring the `kube_pod_container_status_restarts_total` metric can indicate container restarts that might be governed by these rules.
901
902
902
903
###### How can someone using this feature know that it is working for their instance?
903
904
@@ -912,175 +913,68 @@ Recall that end users cannot usually observe component logs or access metrics.
912
913
913
914
- [ ] Events
914
915
- Event Reason:
915
-
- [] API .status
916
-
- Condition name:
917
-
- Other field:
918
-
- [] Other (treat as last resort)
919
-
- Details:
916
+
- [x] API .status
917
+
- Other field: ContainerStatuses
918
+
- Container statuses will have the history of the container restarts.
919
+
- [x] Other (treat as last resort)
920
+
- Details:The metric `kube_pod_container_status_restarts_total` will show the total count of container restarts.
920
921
921
922
###### What are the reasonable SLOs (Service Level Objectives) for the enhancement?
922
923
923
-
<!--
924
-
This is your opportunity to define what "normal" quality of service looks like
925
-
for a feature.
926
-
927
-
It's impossible to provide comprehensive guidance, but at the very
928
-
high level (needs more precise definitions) those may be things like:
929
-
- per-day percentage of API calls finishing with 5XX errors <= 1%
930
-
- 99% percentile over day of absolute value from (job creation time minus expected
931
-
job creation time) for cron job <= 10%
932
-
- 99.9% of /health requests per day finish with 200 code
933
-
934
-
These goals will help you determine what you need to measure (SLIs) in the next
935
-
question.
936
-
-->
924
+
- The rate of unexpected container restarts (i.e., not matching a `restartPolicyRules`) should remain below 1%.
925
+
- The time taken for a container to restart after an exit code matching `restartPolicyRules` should be within typical container restart latencies, accounting for exponential backoff.
926
+
- Kubelet SLOs should not be impacted.
937
927
938
928
###### What are the SLIs (Service Level Indicators) an operator can use to determine the health of the service?
- Aggregation method: Sum over time, grouped by container and pod.
933
+
- Components exposing the metric: kube-state-metrics
934
+
- [x] Other (treat as last resort)
935
+
- Details: PodStatus API will also have a full history of containers restarted in ContainerStatuses field. Containers restarted by RestartPolicyRules will be included in the statuses history.
950
936
951
937
###### Are there any missing metrics that would be useful to have to improve observability of this feature?
952
938
953
-
<!--
954
-
Describe the metrics themselves and the reasons why they weren't added (e.g., cost,
955
-
implementation difficulties, etc.).
956
-
-->
939
+
No.
957
940
958
941
### Dependencies
959
942
960
-
<!--
961
-
This section must be completed when targeting beta to a release.
962
-
-->
963
-
964
943
###### Does this feature depend on any specific services running in the cluster?
965
944
966
-
<!--
967
-
Think about both cluster-level services (e.g. metrics-server) as well
968
-
as node-level agents (e.g. specific version of CRI). Focus on external or
969
-
optional services that are needed. For example, if this feature depends on
970
-
a cloud provider API, or upon an external software-defined storage or network
971
-
control plane.
972
-
973
-
For each of these, fill in the following—thinking about running existing user workloads
974
-
and creating new ones, as well as about cluster-level services (e.g. DNS):
975
-
- [Dependency name]
976
-
- Usage description:
977
-
- Impact of its outage on the feature:
978
-
- Impact of its degraded performance or high-error rates on the feature:
979
-
-->
945
+
No.
980
946
981
947
### Scalability
982
948
983
-
<!--
984
-
For alpha, this section is encouraged: reviewers should consider these questions
985
-
and attempt to answer them.
986
-
987
-
For beta, this section is required: reviewers must answer these questions.
988
-
989
-
For GA, this section is required: approvers should be able to confirm the
990
-
previous answers based on experience in the field.
991
-
-->
992
-
993
949
###### Will enabling / using this feature result in any new API calls?
0 commit comments