Skip to content
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

Automated cherry pick of #123323: Validate restartable init container state transition #123709

Conversation

gjkim42
Copy link
Member

@gjkim42 gjkim42 commented Mar 5, 2024

Without this fix, kubernetes cannot update the sidecar container' statuses from Job once it is terminated.

The sidecar container can continually restart but its container status will be stuck in the first terminated state. It seems like a quite critical bug for me.

This allows the state of restartable init containers to be transitioned from terminated to non-terminated even for pods with RestartPolicyNever or RestartPolicyOnFailure.

Cherry pick of #123323 on release-1.29.

#123323: Validate restartable init container state transition

For details on the cherry pick process, see the cherry pick requests page.

Fixed a bug that an init container with containerRestartPolicy with `Always` cannot update its state from terminated to non-terminated for the pod with restartPolicy with `Never` or `OnFailure`.

This allows the state of restartable init containers to be transitioned
from terminated to non-terminated even for pods with RestartPolicyNever
or RestartPolicyOnFailure.
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Mar 5, 2024
@k8s-ci-robot k8s-ci-robot added do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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 Mar 5, 2024
@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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Mar 5, 2024
@k8s-ci-robot k8s-ci-robot added sig/apps Categorizes an issue or PR as relevant to SIG Apps. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 5, 2024
@gjkim42
Copy link
Member Author

gjkim42 commented Mar 5, 2024

/cc @SergeyKanzhelev
/assign @thockin

@gjkim42
Copy link
Member Author

gjkim42 commented Mar 5, 2024

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Mar 5, 2024
@gjkim42
Copy link
Member Author

gjkim42 commented Mar 5, 2024

This is a quite critical bug as kubernetes cannot update the crashed sidecar container's states of Job without this.

@thockin
Copy link
Member

thockin commented Mar 5, 2024

Thanks!

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: 8f0f824bcecd2c5afb255b56b87c50ad997c26f0

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 5, 2024
@gjkim42
Copy link
Member Author

gjkim42 commented Mar 5, 2024

/cc kubernetes/release-managers

@k8s-ci-robot k8s-ci-robot requested a review from a team March 5, 2024 23:24
@k8s-ci-robot k8s-ci-robot added cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. and removed do-not-merge/cherry-pick-not-approved Indicates that a PR is not yet approved to merge into a release branch. labels Mar 7, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gjkim42, saschagrunert, thockin

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 merged commit bca71f3 into kubernetes:release-1.29 Mar 7, 2024
16 checks passed
@gjkim42 gjkim42 deleted the automated-cherry-pick-of-#123323-upstream-release-1.29 branch March 7, 2024 15:15
rphillips added a commit to rphillips/kubernetes that referenced this pull request Apr 18, 2024
…herry-pick-of-#123323-upstream-release-1.29"

This reverts commit bca71f3, reversing
changes made to 9cbee4d.
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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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. 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants