Skip to content

feat: require explicit targetValue in scaling metric specs#1597

Merged
linkvt merged 1 commit intokedacore:mainfrom
linkvt:require-scaling-metric-target-value
Apr 23, 2026
Merged

feat: require explicit targetValue in scaling metric specs#1597
linkvt merged 1 commit intokedacore:mainfrom
linkvt:require-scaling-metric-target-value

Conversation

@linkvt
Copy link
Copy Markdown
Contributor

@linkvt linkvt commented Apr 22, 2026

Absolute autoscaling thresholds are highly workload-dependent and should not have silent defaults.

No changelog entry as this is part of the unreleased work for #1501 .

Changes

  • Remove +kubebuilder:default=100 and +optional from TargetValue in ConcurrencyTargetSpec and RequestRateTargetSpec
  • Update CRD schema to mark targetValue as required

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO)
  • Docs are updated right now

Absolute autoscaling thresholds are highly workload-dependent and
should not have silent defaults.

Changes:
- Remove +kubebuilder:default=100 and +optional from TargetValue in
  ConcurrencyTargetSpec and RequestRateTargetSpec
- Update CRD schema to mark targetValue as required

Signed-off-by: Vincent Link <[email protected]>
Copilot AI review requested due to automatic review settings April 22, 2026 10:48
@linkvt linkvt requested a review from a team as a code owner April 22, 2026 10:48
@snyk-io
Copy link
Copy Markdown

snyk-io Bot commented Apr 22, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@keda-automation keda-automation requested a review from a team April 22, 2026 10:48
@linkvt linkvt added this to the v0.14.0 milestone Apr 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes implicit defaults for absolute autoscaling thresholds by requiring users to explicitly set targetValue in InterceptorRoute scaling metric specs.

Changes:

  • Remove +kubebuilder:default=100 and +optional from TargetValue in ConcurrencyTargetSpec and RequestRateTargetSpec.
  • Update the generated CRD schema to mark targetValue as required for both concurrency and requestRate metric configs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
operator/apis/http/v1beta1/interceptorroute_types.go Makes targetValue a required field at the Go type level (removes default/optional semantics).
config/crd/bases/http.keda.sh_interceptorroutes.yaml Enforces targetValue as required in the CRD OpenAPI schema (removes default).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@linkvt linkvt merged commit 5adc63f into kedacore:main Apr 23, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants