Repository navigation
fix(k8s): tolerate scale-to-zero during deployment readiness - #4075
Elvand-Lie wants to merge 1 commit into
Conversation
Judge zero replicas from reconciled Deployment status without looking for an active ReplicaSet. Retry a missing pod-template-hash when scaler updates make Deployment and ReplicaSet reads inconsistent. API failures still propagate and unresolved state still times out. Exercise the exported name and selector waits with a real Clientset and an HTTP test server, including stale status, scale-down between reads, healthy nonzero deployments, cancellation and API failures. Fixes knative#4068 Assisted-by: OpenAI Codex and Claude Code Signed-off-by: Elvand Lie Nababan <elvandlie@gmail.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Elvand-Lie 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 |
|
Hi @Elvand-Lie. 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 Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain 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. |
KEDA can scale a Deployment to zero while func waits after redeploy. The wait previously aborted when no active ReplicaSet supplied a pod-template-hash. Judge zero replicas by current-generation Deployment status, and retry inconsistent Deployment/ReplicaSet reads during scaling. API errors still fail and unresolved state still times out.
Idle zero-replica success does not establish that a pod of the new image ran. This changes the shared raw/keda wait; Knative uses its own Serving readiness. Remote deployments receive it after the func-util image is released.
Testing: exported wait and selector tests use a concrete Clientset with an httptest API server. They cover reconciled zero, stale/remaining status, scale-down between reads, healthy nonzero, timeout, cancellation and API errors. Main fails the reported hash-error regressions. Linux make test, make check, check-schema and check-embedded-fs passed. No valid revised Windows, live KEDA/cluster or macOS checks.
/kind bug
Fixes #4068