Skip to content

Comments

Support exec readiness probes for sidecar containers#15773

Merged
knative-prow[bot] merged 5 commits intoknative:mainfrom
flomedja:support-exec-readiness-probes-for-sidecar-containers
Apr 18, 2025
Merged

Support exec readiness probes for sidecar containers#15773
knative-prow[bot] merged 5 commits intoknative:mainfrom
flomedja:support-exec-readiness-probes-for-sidecar-containers

Conversation

@flomedja
Copy link
Contributor

Fixes #15484

Proposed Changes

Delegate the exec readiness probes to kubernetes for sidecar containers. The controller previsouly return an error when a exec readiness probes is defined on a sidecar container. We now support the exec readiness probes for all the containers.

Release Note

Support exec readiness probes for sidecar containers

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 12, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@knative-prow
Copy link

knative-prow bot commented Feb 12, 2025

Welcome @flomedja! It looks like this is your first PR to knative/serving 🎉

@knative-prow
Copy link

knative-prow bot commented Feb 12, 2025

Hi @flomedja. Thanks for your PR.

I'm waiting for a knative 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.

Details

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.

@knative-prow knative-prow bot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 12, 2025
@knative-prow knative-prow bot requested review from dsimansk and skonto February 12, 2025 16:07
@flomedja flomedja marked this pull request as draft February 12, 2025 16:11
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 12, 2025
@flomedja flomedja force-pushed the support-exec-readiness-probes-for-sidecar-containers branch from c1d3397 to c14663c Compare February 12, 2025 16:13
@flomedja flomedja marked this pull request as ready for review February 12, 2025 16:18
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 12, 2025
@knative-prow knative-prow bot requested a review from dprotaso February 12, 2025 16:18
@dprotaso
Copy link
Member

/ok-to-test

@knative-prow knative-prow bot 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 Feb 12, 2025
@codecov
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 62.50000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.91%. Comparing base (e193904) to head (16cb6b2).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pkg/activator/net/revision_backends.go 40.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #15773   +/-   ##
=======================================
  Coverage   80.90%   80.91%           
=======================================
  Files         210      210           
  Lines       16698    16706    +8     
=======================================
+ Hits        13510    13518    +8     
  Misses       2838     2838           
  Partials      350      350           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@flomedja
Copy link
Contributor Author

@dprotaso @skonto A e2e test failed for v1.30.x but succeeded for v1.31.x. I don't see an option to rerun the test. How can I rerun it ?

Also I see a MR removing the support for v.1.30.x, was there some issues with this version ?

@skonto
Copy link
Contributor

skonto commented Feb 13, 2025

To re-test you can do:

image

@skonto
Copy link
Contributor

skonto commented Feb 13, 2025

The failure was due to kind not being setup correctly. I will re-run.

@flomedja
Copy link
Contributor Author

image

@skonto I don't see the re-run button on my side. I suspect that you need to be a special group member to be able to re-run tests. Thanks for the help.

@dprotaso All the tests passed. You can take a look to the implementation when you have a moment :). Thanks

@flomedja
Copy link
Contributor Author

@skonto @dprotaso Just a reminder for the MR :)

@flomedja
Copy link
Contributor Author

@skonto @dprotaso Just a reminder for the review :)

@dprotaso
Copy link
Member

thanks for the change @flomedja looks good.

We'll need to also disable some probe optimizations in the activator when the sidecar and an exec probe

enableProbeOptimisation := true
if rp := rev.Spec.GetContainer().ReadinessProbe; rp != nil && rp.Exec != nil {
enableProbeOptimisation = false
}
// Startup probes are executed by Kubelet, so we can only mark the container as ready
// once K8s sees it as ready.
if sp := rev.Spec.GetContainer().StartupProbe; sp != nil {
enableProbeOptimisation = false
}

@knative-prow knative-prow bot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 15, 2025
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 15, 2025
@flomedja
Copy link
Contributor Author

@dprotaso Thanks for the comment. I added the changes to disabel the probe optimization when a sidecar container have a exec probe.

@dprotaso
Copy link
Member

/lgtm
/approve

thanks @flomedja

@knative-prow knative-prow bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 18, 2025
@flomedja
Copy link
Contributor Author

@dprotaso My pleasure! I'd be happy to contribute to other issues as well, just let me know where I can help!

@dprotaso
Copy link
Member

dprotaso commented Apr 18, 2025

If you see any issues you want to work on just message me in the CNCF slack (https://communityinviter.com/apps/cloud-native/cncf) and I can walk through stuff

@dprotaso
Copy link
Member

/lgtm
/approve

@dprotaso
Copy link
Member

/hold cancel

@knative-prow
Copy link

knative-prow bot commented Apr 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, flomedja

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

The pull request process is described here

Details 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

@knative-prow knative-prow bot merged commit c7f03af into knative:main Apr 18, 2025
68 checks passed
@flomedja flomedja deleted the support-exec-readiness-probes-for-sidecar-containers branch December 12, 2025 15:48
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. lgtm 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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support exec readinessProbes for sidecar serving containers

3 participants