Expose KEDA ScaledObject and HTTP scaling configuration options
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go
- Domain
- devops, infrastructure
Research direction
Start with pkg/keda/kafka_scaling.go and pkg/keda/deployer.go, then trace how scale.keda options from func.yaml are represented and passed into these KEDA configurations. Implement the proposed optional pollingInterval, cooldownPeriod, and HTTP targetValue fields first, and verify that configured values replace the current defaults without changing behavior when omitted.
Written by the indexing model from the issue text.
Description
Problem
Several KEDA scaling configuration values are currently hardcoded and not configurable via func.yaml.
ScaledObject (Kafka trigger)
Hardcoded in pkg/keda/kafka_scaling.go:
cooldownPeriod: 300 (seconds) — how long before scaling down after triggers go idlepollingInterval: not set, defaults to 30 seconds — how often KEDA checks metrics
Not exposed from KEDA's Kafka scaler:
offsetResetPolicyallowIdleConsumersexcludePersistentLagscaleToZeroOnInvalidOffsetlimitToPartitionsWithLag
HTTPScaledObject (HTTP trigger)
Hardcoded in pkg/keda/deployer.go:
CooldownPeriod: 300ScalingMetric.Rate.TargetValue: 100 (requests/sec)ScalingMetric.Rate.Window: 1 minuteScalingMetric.Rate.Granularity: 1 second
Proposed solution
Add optional fields to scale.keda in func.yaml for the common options:
deploy:
options:
scale:
keda:
pollingInterval: 15
cooldownPeriod: 60
triggers:
- type: kafka
lagThreshold: 5
- type: http
targetValue: 50
Start with pollingInterval, cooldownPeriod, and HTTP targetValue as the most impactful. The Kafka-specific options (allowIdleConsumers, etc.) can be added later as needed.
- Dominant language
- Go
- Stars
- 365
- Forks
- 223
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 25
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from knative/func
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
lifecycle/stale
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
setServiceOptions: %f format produces invalid autoscaling annotation values with trailing zeros Openlifecycle/stale
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
kind/bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
alexgorbatchev/dotfiles#107 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100