Conversation
Gate init container restart policies and startup probes with existing init-container support. Co-authored-by: OpenCode
Co-authored-by: OpenCode
Retain pinned versions and add the streaming dependency closure required by e2e tests. Co-authored-by: OpenCode
Add controlled success and failure cases plus isolated-cluster verification instructions. Live execution remains pending. Co-authored-by: OpenCode
|
@titaneric: The label(s) DetailsIn response to this:
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. |
|
Welcome @titaneric! It looks like this is your first PR to knative/serving 🎉 |
|
Hi @titaneric. 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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: titaneric The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Changes
restartPolicy: Alwaysand optional startup probes under the existingkubernetes.podspec-init-containersflag. Kubernetes owns startup ordering; no queue-proxy or Pod-builder behavior is changed.This is a draft PoC for #16833. A long-running helper can initialize before the application and continue running afterward. A startup probe gates subsequent initialization and regular containers; a regular sidecar's readiness/startup probe does not provide that ordering.
Please review the choice to reuse the existing init-container flag rather than add a separate flag. Readiness/liveness probes and lifecycle hooks on init containers remain out of scope. Related serving-container restart-policy work in #16750/#16751 explicitly leaves native sidecars separate.
The added
github.com/moby/spdystreamandk8s.io/streamingrequirements come from the e2e test's client-go port-forwarding path, not the production admission fix. No existing dependency versions were upgraded. Direct Pod-subresource forwarding is used because the Pod can remain Pending while its helper's startup probe is blocked.Validation
Local checks passed:
Targeted
go vetandgo mod verifyalso passed. This does not claim a full repository presubmit run.Kind results
Tested on 2026-11-27–28 in a dedicated kind v0.33.0 / Kubernetes v1.35.8 / linux-arm64 cluster with one control-plane/worker node, containerd 2.3.4, and Kourier. Serving and fixture images were built locally and imported; no external image publication was needed.
Node image:
kindest/node:v1.35.8@sha256:07b2536e30b803ed61d1677a79df6115f798ce64c80f9e22f6ed45afd09323c0.TestNativeSidecarStartup,-race -count=3TestNativeSidecarStartupFailure,-race -count=3TestInitContainersregressionThe six race-enabled native-sidecar executions completed in 139.931s, with no race reports. Success cases took 38.16s / 37.20s / 38.18s; failure cases took 8.11s / 8.11s / 8.10s, including cleanup.
The local gateway listener matched its HTTP NodePort. For the offline setup, tag resolution was skipped only for the local image registry name; the ordinary init-container regression ran separately with a digest-qualified image. An initial run using
host:portas the ingress override was stopped and corrected to host-only. Editing feature example comments also required regenerating the ConfigMap example checksum, included here.The manual flag-disable check used the API server Pod proxy to release its helper; automated tests independently verified direct client-go forwarding during initialization. Original and replacement Pod UIDs differed, while the Revision UID stayed unchanged.
Remaining limits
/kind enhancement
Fixes #16833
Release Note
Docs
A separate knative/docs change has not been opened; the operator-facing flag documentation should follow agreement on this draft's scope.