Keda Trait

The KEDA trait can be used for automatic integration with KEDA autoscalers. The trait can be either manually configured using the triggers option or automatically configured via markers in the Kamelets.

For information on how to use KEDA enabled Kamelets with the KEDA trait, refer to the KEDA section in the Kamelets user guide. If you want to create Kamelets that contain KEDA metadata, refer to the KEDA section in the Kamelets development guide.

The KEDA trait is disabled by default.

This trait is available in the following profiles: Kubernetes, Knative, OpenShift.

Configuration

Trait properties can be specified when running any integration with the CLI:

$ kamel run --trait keda.[key]=[value] --trait keda.[key2]=[value2] integration.groovy

The following configuration options are available:

Property Type Description

keda.enabled

bool

Can be used to enable or disable a trait. All traits share this common property.

keda.auto

bool

Enables automatic configuration of the trait. Allows the trait to infer KEDA triggers from the Kamelets.

keda.hack-controller-replicas

bool

Set the spec→replicas field on the top level controller to an explicit value if missing, to allow KEDA to recognize it as a scalable resource.

keda.polling-interval

int32

Interval (seconds) to check each trigger on.

keda.cooldown-period

int32

The wait period between the last active trigger reported and scaling the resource back to 0.

keda.idle-replica-count

int32

Enabling this property allows KEDA to scale the resource down to the specified number of replicas.

keda.min-replica-count

int32

Minimum number of replicas.

keda.max-replica-count

int32

Maximum number of replicas.

keda.triggers

[]github.com/apache/camel-k/v2/addons/keda.kedaTrigger

Definition of triggers according to the KEDA format. Each trigger must contain type field corresponding to the name of a KEDA autoscaler and a key/value map named metadata containing specific trigger options. An optional authentication-secret can be declared per trigger and the operator will link each entry of the secret to a KEDA authentication parameter.