Skip to content

Fix KPA initial scale exceeding max scale - #16710

Open
jahnavigajjala-3 wants to merge 5 commits into
knative:mainfrom
jahnavigajjala-3:fix/kpa-initial-scale-max
Open

jahnavigajjala-3 wants to merge 5 commits into
knative:mainfrom
jahnavigajjala-3:fix/kpa-initial-scale-max

Conversation

@jahnavigajjala-3

Copy link
Copy Markdown
Contributor

Fixes #16709

Proposed Changes

  • Clamp the configured initial scale to maxScale when maxScale is positive, preventing the KPA scaler from exceeding the configured maximum during initial scaling.
  • Apply the same bound when calculating the KPA activation threshold so a revision can become active once the allowed number of pods is ready.
  • Add regression tests covering initial-scale bounds, unlimited scaling (maxScale = 0), min/max-scale interactions, unreachable revisions, and activation behavior.

Release Note

Fix KPA initial scaling and activation thresholds to respect maxScale.

@knative-prow knative-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 18, 2026
@knative-prow

knative-prow Bot commented Oct 18, 2026

Copy link
Copy Markdown

Hi @jahnavigajjala-3. 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 commented Oct 18, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jahnavigajjala-3
Once this PR has been reviewed and has the lgtm label, please assign aliok for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 requested review from dprotaso, matzew and skonto October 18, 2026 16:42
@codecov

codecov Bot commented Oct 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.34%. Comparing base (b6c3209) to head (051413a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16710      +/-   ##
==========================================
- Coverage   80.36%   80.34%   -0.02%     
==========================================
  Files         217      217              
  Lines       13560    13564       +4     
==========================================
+ Hits        10897    10898       +1     
- Misses       2301     2305       +4     
+ Partials      362      361       -1     

☔ View full report in Codecov by Harness.
📢 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it 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.

KPA initial scale can exceed max-scale and prevent activation

1 participant