Skip to content

Conversation

@gjkim42
Copy link
Member

@gjkim42 gjkim42 commented Jul 8, 2023

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

This is a follow-up PR for #116429

  • Allow restartable init containers to have readiness/liveness probes and lifecycle
  • Generate ContainersReadyCondition with restartable init containers
  • Add probes and lifecycle hooks e2e tests for restartable init containers

Which issue(s) this PR fixes:

Fixes #
depends on #119179
ref: #115934

Special notes for your reviewer:

Does this PR introduce a user-facing change?

none

wrote "none", as we already added a release note in #116429.

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

- [KEP]: https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/753-sidecar-containers

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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. labels Jul 8, 2023
@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 needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 8, 2023
@gjkim42
Copy link
Member Author

gjkim42 commented Jul 8, 2023

/sig node

@k8s-ci-robot k8s-ci-robot added sig/node Categorizes an issue or PR as relevant to SIG Node. area/kubelet sig/apps Categorizes an issue or PR as relevant to SIG Apps. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 8, 2023
@gjkim42 gjkim42 force-pushed the sidecar-allow-probes-and-lifecycle-hooks branch from ebd9e26 to eaa563a Compare July 8, 2023 01:32
@gjkim42 gjkim42 force-pushed the sidecar-allow-probes-and-lifecycle-hooks branch from eaa563a to aeeec82 Compare July 9, 2023 04:52
@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Jul 9, 2023
@gjkim42
Copy link
Member Author

gjkim42 commented Jul 9, 2023

/test pull-kubernetes-node-e2e-containerd-sidecar-containers

@gjkim42 gjkim42 force-pushed the sidecar-allow-probes-and-lifecycle-hooks branch from aeeec82 to 0675c82 Compare July 9, 2023 05:23
@gjkim42
Copy link
Member Author

gjkim42 commented Jul 9, 2023

/test pull-kubernetes-node-e2e-containerd-sidecar-containers

@gjkim42 gjkim42 force-pushed the sidecar-allow-probes-and-lifecycle-hooks branch from 0675c82 to 26a7408 Compare July 9, 2023 09:18
@gjkim42
Copy link
Member Author

gjkim42 commented Jul 9, 2023

/test pull-kubernetes-node-e2e-containerd-sidecar-containers

@gjkim42 gjkim42 force-pushed the sidecar-allow-probes-and-lifecycle-hooks branch 2 times, most recently from d3de630 to 72c8951 Compare July 11, 2023 15:04
@k8s-ci-robot k8s-ci-robot removed the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 11, 2023
@gjkim42
Copy link
Member Author

gjkim42 commented Jul 17, 2023

/test pull-kubernetes-node-e2e-containerd-sidecar-containers
/test pull-kubernetes-e2e-gce-cos-alpha-features

@thockin
Copy link
Member

thockin commented Jul 17, 2023

I have not been tracking this one - is it hoping to merge for 1.28?

@gjkim42
Copy link
Member Author

gjkim42 commented Jul 17, 2023

I have not been tracking this one - is it hoping to merge for 1.28?

Yes, it is targeted at 1.28.

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

/approve

for validation

@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 17, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Would you add a comment explaining this break as well? I spent a few minutes looking at the two above if statements and this break and it wasn't immediately obvious what the rationale is. It's probably right, I just wasn't able to figure it out just from looking at the code..

Copy link
Member Author

Choose a reason for hiding this comment

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

nit: Would you add a comment explaining this break as well? I spent a few minutes looking at the two above if statements and this break and it wasn't immediately obvious what the rationale is. It's probably right, I just wasn't able to figure it out just from looking at the code..

I think the current code is slightly wrong...

A restartable init container doesn't have to take into account its liveness probe when it determines to start the next init container.

will fix it soon.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed kubelet to not take into account the container's livenessProbe when it decides to start the next init container.

https://github.com/kubernetes/kubernetes/compare/8ca77dc4bef1be820137a667ebe082e3721cf7c3..d029f0ef0603256c89617c1b4e7898d2f2f87951

@gjkim42 gjkim42 force-pushed the sidecar-allow-probes-and-lifecycle-hooks branch from 8ca77dc to 7e670fd Compare July 17, 2023 22:55
@gjkim42
Copy link
Member Author

gjkim42 commented Jul 17, 2023

/test pull-kubernetes-node-e2e-containerd-sidecar-containers
/test pull-kubernetes-e2e-gce-cos-alpha-features

@gjkim42 gjkim42 force-pushed the sidecar-allow-probes-and-lifecycle-hooks branch from 7e670fd to d029f0e Compare July 17, 2023 23:12
@gjkim42
Copy link
Member Author

gjkim42 commented Jul 17, 2023

/test pull-kubernetes-node-e2e-containerd-sidecar-containers
/test pull-kubernetes-e2e-gce-cos-alpha-features

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.

/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 Jul 17, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 7e8554f6ad5af9ef45e4d35c55c68cc9a3681dcc

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gjkim42, mrunalp, SergeyKanzhelev, thockin, Tusenka

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 d17f3ba into kubernetes:master Jul 18, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jul 18, 2023
@gjkim42 gjkim42 deleted the sidecar-allow-probes-and-lifecycle-hooks branch July 18, 2023 01:13
})
})

var _ = SIGDescribe("[NodeAlphaFeature:SidecarContainers][Feature:SidecarContainers] Restartable Init Container Lifecycle Hook", func() {
Copy link
Member

Choose a reason for hiding this comment

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

@SergeyKanzhelev
Copy link
Member

sidecar-specific job pull-kubernetes-node-e2e-containerd-sidecar-containers passes and green. Maybe some interference between jobs

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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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-none Denotes a PR that doesn't merit a release note. sig/apps Categorizes an issue or PR as relevant to SIG Apps. 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

9 participants