feat: require explicit targetValue in scaling metric specs#1597
Merged
linkvt merged 1 commit intokedacore:mainfrom Apr 23, 2026
Merged
feat: require explicit targetValue in scaling metric specs#1597linkvt merged 1 commit intokedacore:mainfrom
linkvt merged 1 commit intokedacore:mainfrom
Conversation
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]>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
There was a problem hiding this comment.
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=100and+optionalfromTargetValueinConcurrencyTargetSpecandRequestRateTargetSpec. - Update the generated CRD schema to mark
targetValueas required for bothconcurrencyandrequestRatemetric 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.
Fedosin
approved these changes
Apr 22, 2026
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.
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
Checklist