Skip to content

ContainerRestartRules feature gate should work with probes #133243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2025

Conversation

yuanwang04
Copy link
Contributor

@yuanwang04 yuanwang04 commented Jul 27, 2025

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixes the feature gate ContainerRestartRules not working with readiness probes.

Which issue(s) this PR is related to:

Fixes #133216
KEP: kubernetes/enhancements#5307

Special notes for your reviewer:

Added the computePodAction unit tests under the feature gate ContainerRestartRules to ensure all existing behavior stays the same when the feature is enabled.

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

- [KEP]: https://github.com/kubernetes/enhancements/issues/5307

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 27, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @yuanwang04. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 27, 2025
@yuanwang04
Copy link
Contributor Author

/cc @SergeyKanzhelev

@SergeyKanzhelev
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 28, 2025
@SergeyKanzhelev
Copy link
Member

/test pull-kubernetes-e2e-kind-alpha-beta-features

@HirazawaUi
Copy link
Contributor

This feature-related e2e test was skipped in the pull-kubernetes-e2e-kind-alpha-beta-features test job and was not executed.

You don't need to add the feature.ContainerRestartRules label to the test case, as it appears to be causing the test case to be skipped.

@aojea aojea mentioned this pull request Jul 28, 2025
@aojea
Copy link
Member

aojea commented Jul 28, 2025

You don't need to add the feature.ContainerRestartRules label to the test case, as it appears to be causing the test case to be skipped.

See https://groups.google.com/a/kubernetes.io/g/dev/c/uVga86nJDuI/m/gVujvOCnDwAJ for instructions
/cc @BenTheElder

@k8s-ci-robot k8s-ci-robot requested a review from BenTheElder July 28, 2025 13:27
@aojea
Copy link
Member

aojea commented Jul 28, 2025

@yuanwang04 , what @HirazawaUi says

diff --git a/test/e2e/node/pods.go b/test/e2e/node/pods.go
index 94171ea245f..dd8528bcf74 100644
--- a/test/e2e/node/pods.go
+++ b/test/e2e/node/pods.go
@@ -718,7 +718,7 @@ var _ = SIGDescribe("Pods Extended (pod generation)", feature.PodObservedGenerat
        })
 })
 
-var _ = SIGDescribe("Pod Extended (container restart policy)", feature.ContainerRestartRules, framework.WithFeatureGate(features.ContainerRestartRules), func() {
+var _ = SIGDescribe("Pod Extended (container restart policy)", framework.WithFeatureGate(features.ContainerRestartRules), func() {
        f := framework.NewDefaultFramework("pods")
        f.NamespacePodSecurityLevel = admissionapi.LevelBaseline

@SergeyKanzhelev
Copy link
Member

/test pull-kubernetes-e2e-kind-alpha-beta-features

@SergeyKanzhelev
Copy link
Member

changes are ok, and I think it is safe to move forward instead of rolling back. Everything is under the feature gate still.

let's wait for tests execution

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 28, 2025
@SergeyKanzhelev
Copy link
Member

/test pull-kubernetes-e2e-kind-alpha-beta-features

@@ -718,7 +718,7 @@ var _ = SIGDescribe("Pods Extended (pod generation)", feature.PodObservedGenerat
})
})

var _ = SIGDescribe("Pod Extended (container restart policy)", feature.ContainerRestartRules, framework.WithFeatureGate(features.ContainerRestartRules), func() {
var _ = SIGDescribe("Pod Extended (container restart policy)", framework.WithFeatureGate(features.ContainerRestartRules), func() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BenTheElder
Copy link
Member

@BenTheElder
Copy link
Member

/test pull-kubernetes-e2e-kind-alpha-features
/test pull-kubernetes-e2e-kind-beta-features

@k8s-ci-robot
Copy link
Contributor

@yuanwang04: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-e2e-kind-alpha-features fd206a0 link false /test pull-kubernetes-e2e-kind-alpha-features

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@BenTheElder
Copy link
Member

Kubernetes e2e suite: [It] [sig-network] Proxy version v1 should proxy through a service and a pod [Conformance]

#133257

/retest

@BenTheElder
Copy link
Member

[these PASSED, testing again for more signal]
/test pull-kubernetes-e2e-kind-alpha-beta-features
/test pull-kubernetes-e2e-kind-beta-features

@BenTheElder
Copy link
Member

/priority critical-urgent
/triage accepted
/approve
for test/

@k8s-ci-robot k8s-ci-robot added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 28, 2025
Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm
/milestone v1.34

@k8s-ci-robot k8s-ci-robot added this to the v1.34 milestone Jul 28, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 28, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 06d406af05114f50bdd78edb26219edfde035b89

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, SergeyKanzhelev, yuanwang04

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2025
@k8s-ci-robot k8s-ci-robot merged commit 924b324 into kubernetes:master Jul 28, 2025
14 of 17 checks passed
@github-project-automation github-project-automation bot moved this from Triage to Done in SIG Node CI/Test Board Jul 28, 2025
@SergeyKanzhelev
Copy link
Member

SergeyKanzhelev commented Jul 28, 2025

[these PASSED, testing again for more signal] /test pull-kubernetes-e2e-kind-alpha-beta-features /test pull-kubernetes-e2e-kind-beta-features

oops, I missed this. Sorry. Let's watch for tests in master

@BenTheElder
Copy link
Member

SGTM, I expect them to pass again, and these were failing not flaking so we probably don't need another run anyhow.

But they're quick, cheap, and currently all non-blocking so ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
6 participants