feat(trait): Add metricType support to the KEDA trait triggers - #6740
Conversation
squakez
left a comment
There was a problem hiding this comment.
LGTM, thanks! Just a minor comment change if you wish to apply.
Is there a chance to include it in 2.11.0 release ? |
Yes, for sure. |
Add an optional trigger-level `metricType` field to the KEDA trait (`Utilization`, `AverageValue` or `Value`), mapping to KEDA's ScaleTriggers.metricType. Required by the cpu/memory scalers in KEDA v2.18+ where the deprecated metadata.type was removed. Regenerated CRDs, Helm CRDs and API docs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
70a5d18 to
a47ad80
Compare
|
@squakez |
|
@squakez |
|
Checks failure unrelated. Merging. |
This PR adds support for specifying a trigger-level
metricTypein the KEDA trait, mapping to KEDA'sScaleTriggers.metricTypefield (Utilization,AverageValueorValue).This is required for compatibility with KEDA v2.18+, which removed the deprecated
metadata.typefield for thecpuandmemoryscalers. Without a way to set the trigger-levelmetricType, those scalers can no longer be configured through the KEDA trait on recent KEDA versions.Changes
MetricTypefield toKedaTrigger(pkg/apis/camel/v1/trait/keda.go), exposed as themetric-typetrait property and validated against the enumUtilization/AverageValue/Value.MetricTypefield to the KEDA duck typeScaleTriggers(pkg/apis/duck/keda/v1alpha1/duck_types.go).MetricTypefrom the trait trigger to the generatedScaledObjecttriggers (pkg/trait/keda.go).TestKedaMetricTypecovering acputrigger withmetricType: Utilization.Example
Release Note