Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Restores KEDA compatibility for functions containing ignored scale.kpa configuration.
Changes:
- Falls back to HTTP scaling when only
scale.kpais present. - Removes KEDA/KPA mutual-exclusion validation.
- Updates validation, tests, and documentation.
| File | Summary |
|---|---|
pkg/keda/kafka_scaling.go |
Restores HTTP trigger fallback. |
pkg/keda/kafka_scaling_test.go |
Tests KPA-only fallback behavior. |
pkg/keda/deployer.go |
Limits validation to explicit KEDA configuration. |
pkg/keda/deployer_unit_test.go |
Removes obsolete exclusivity test. |
pkg/functions/function_scale.go |
Allows KEDA and KPA blocks together. |
pkg/functions/function_options_unit_test.go |
Tests coexistence validation. |
docs/reference/func_yaml.md |
Documents ignored deployer-specific configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aliok
force-pushed
the
fix-keda-kpa-scale
branch
from
October 5, 2026 14:49
5fe8daa to
f0c6f53
Compare
aliok
force-pushed
the
fix-keda-kpa-scale
branch
from
October 6, 2026 07:16
f0c6f53 to
a74f7da
Compare
Contributor
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, gauron99 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Follow-up to review feedback on #4069 (thanks @gauron99); reproduced on a live
cluster.
🐛 Stop rejecting
scale.kpaon the keda deployer.scale.kpaisdeployer: knativeconfig. Per the contract settled in Add top-levelscalefield to func.yaml #4063, the raw andkeda deployers ignore it with a warning rather than rejecting it. Add KEDA Kafka consumer-lag scaling (scale.keda) #4069 broke
that contract on the keda path in two places:
triggers()returnednilwhenscale.kpawas setwithout
scale.keda, so Deploy tripped its empty-triggers guard and failedwith
deployer keda requires at least one trigger in scale.keda.triggers--after first printing the "scale.kpa is ignored" warning.
scale.keda+scale.kpatogether were treated asmutually exclusive, so adding a trigger to a function that already carried a
scale.kpablock was rejected outright. Within a single run the user wastold the block was ignored and then rejected for it.
This is not just a hand-written-config edge case: the 0.38.0 migration
(
migrateScaleToTopLevel) lifts the legacy flatmetric/target/utilizationfields into
scale.kpafor every deployer, deliberately keeping the blockrather than dropping it (so a later switch to
deployer: knativeisn't lossy).So a keda function that used those legacy fields would stop deploying after an
upgrade, for config the user never wrote.
The fix restores the pre-Add KEDA Kafka consumer-lag scaling (scale.keda) #4069 behavior -- warn, then deploy with the http
scaler:
triggers()falls back to the default http trigger instead of returningnil. This matchesIntendedScalerType, which already resolveshttpfor akeda function with only
scale.kpa, so the deploy-time scaler-switch gateand the deploy agree on the scaler type.
ValidateScalebackstop in the keda deployer is gated onscale.kedaalone. Nothing is lost: the keda deployer's own preflightalready guards
scale.min/scale.maxindependently, and the remainingbackstop checks (pollingInterval/cooldownPeriod/per-trigger thresholds) live
under
scale.kedaand are vacuous without it.scale.keda/scale.kpamutual-exclusion rule is dropped (plus thematching docs sentence and tests).
The "scale.kpa is ignored" warning (
cmd/deploy.go) is unchanged, so a kedafunction carrying
scale.kpanow warns and deploys instead of failing./kind bug
Relates to #4069
Release Note
Docs