Skip to content

KEP-3939: Job Pod Replacement Policy; promote to GA #132173

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dejanzele
Copy link
Contributor

@dejanzele dejanzele commented Jun 7, 2025

What type of PR is this?

/kind feature
/sig apps

What this PR does / why we need it:

Promotes JobPodReplacementPolicy to GA.

Which issue(s) this PR is related to:

KEP: kubernetes/enhancements#3939

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Promoted Job Pod Replacement Policy to general availability. The `JobPodReplacementPolicy` feature gate is now locked to true, and will be removed in a future release of Kubernetes.

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

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

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. 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. labels Jun 7, 2025
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jun 7, 2025
@k8s-ci-robot k8s-ci-robot requested review from deads2k and dims June 7, 2025 17:57
@k8s-ci-robot k8s-ci-robot added area/test sig/apps Categorizes an issue or PR as relevant to SIG Apps. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Jun 7, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jun 7, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in SIG Apps Jun 7, 2025
@dejanzele
Copy link
Contributor Author

/cc @kannon92 @mimowo @soltysh @alculquicondor

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 7, 2025
@lmktfy
Copy link

lmktfy commented Jun 8, 2025

Change log suggestion

-Job Pod Replacement Policy is promoted to GA.
+Promoted _Job Pod replacement policy_ to general availability. The `JobPodReplacementPolicy` feature gate is now locked to true, and will be removed in a future release of Kubernetes.

Copy link
Contributor

@kannon92 kannon92 left a comment

Choose a reason for hiding this comment

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

LGTM!

I haven’t been following this KEP as much so I’ll leave labels to someone more familiar if we have got everything needed for GA.

@mimowo
Copy link
Contributor

mimowo commented Jun 9, 2025

Please also adjust the e2e tests per the point in [GA}(https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/3939-allow-replacement-when-fully-terminated#ga) criteria:

Restore the .status.terminating assertion for JobSuccessPolicy Conformance Tests in the following:

// TODO (https://github.com/kubernetes/enhancements/issues/3939): Restore the assert on .status.terminating when PodReplacementPolicy goes GA.
// gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))

// TODO (https://github.com/kubernetes/enhancements/issues/3939): Restore the assert on .status.terminating when PodReplacementPolicy goes GA.
// gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))

// TODO (https://github.com/kubernetes/enhancements/issues/3939): Restore the assert on .status.terminating when PodReplacementPolicy goes GA.
// gomega.Expect(job.Status.Terminating).Should(gomega.Equal(ptr.To[int32](0)))

@dejanzele dejanzele force-pushed the feat/promote-job-pod-replacement-policy-ga branch from f96105b to c4c2f20 Compare June 9, 2025 15:29
@dejanzele
Copy link
Contributor Author

/test pull-kubernetes-e2e-gce

Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

Please add comments in tests disabling the feature gate using emulated version, to indicate that this is to be deleted in 1.37 (in all places using the emulated version).

Similarly as we did for Job success policy.

@dejanzele
Copy link
Contributor Author

dejanzele commented Jun 9, 2025

@mimowo should it be v1.37 (GA+3) or v1.36(GA+2). In the KEP it is mentioned that the feature flag is to be removed in GA+2 version.

@mimowo
Copy link
Contributor

mimowo commented Jun 9, 2025

I might be mistaken here, but I think the emulated versioning now requires longer lifetime of feature gates that it was when the ReplacementPolicy KEP was drafted.

@kannon92
Copy link
Contributor

kannon92 commented Jun 9, 2025

I might be mistaken here, but I think the emulated versioning now requires longer lifetime of feature gates that it was when the ReplacementPolicy KEP was drafted.

Yes, GA+3 is the new norm. https://github.com/kubernetes/enhancements/blob/master/keps/sig-architecture/4330-compatibility-versions/README.md#feature-gate-lifecycles

@dejanzele dejanzele force-pushed the feat/promote-job-pod-replacement-policy-ga branch from c4c2f20 to d4ee973 Compare June 9, 2025 21:33
@mimowo
Copy link
Contributor

mimowo commented Jun 10, 2025

/test pull-kubernetes-e2e-kind-alpha-beta-features
this looks like unrelated flake

Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

/lgtm
Thanks 👍

For the Job controller tests:
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 10, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: cf85a0c7cda66b27523a3b57714157523765f982

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dejanzele, mimowo
Once this PR has been reviewed and has the lgtm label, please assign liggitt, msau42, soltysh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@dejanzele
Copy link
Contributor Author

/assign @soltysh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/apps Categorizes an issue or PR as relevant to SIG Apps. 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.
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

6 participants