wojciechgrazawskiahnl opened a new pull request, #6740:
URL: https://github.com/apache/camel-k/pull/6740
This PR adds support for specifying a trigger-level `metricType` in the KEDA
trait, mapping to KEDA's `ScaleTriggers.metricType` field (`Utilization`,
`AverageValue` or `Value`).
This is required for compatibility with **KEDA v2.18+**, which removed the
deprecated `metadata.type` field for the `cpu` and `memory` scalers. Without a
way to set the trigger-level `metricType`, those scalers can no longer be
configured through the KEDA trait on recent KEDA versions.
### Changes
- Added the `MetricType` field to `KedaTrigger`
(`pkg/apis/camel/v1/trait/keda.go`), exposed as the `metric-type` trait
property and validated against the enum `Utilization`/`AverageValue`/`Value`.
- Added the `MetricType` field to the KEDA duck type `ScaleTriggers`
(`pkg/apis/duck/keda/v1alpha1/duck_types.go`).
- Propagated `MetricType` from the trait trigger to the generated
`ScaledObject` triggers (`pkg/trait/keda.go`).
- Regenerated CRDs and API docs.
- Added `TestKedaMetricType` covering a `cpu` trigger with `metricType:
Utilization`.
### Example
```yaml
traits:
keda:
triggers:
- type: cpu
metricType: Utilization
metadata:
value: "70"
```
## Release Note
```
Add metricType support to the KEDA trait triggers (required for cpu/memory
scalers on KEDA v2.18+).
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]