Knative Trait
The Knative trait automatically discovers addresses of Knative resources and inject them into the running integration.
The Camel Knative component will then use the full configuration to configure the routes.
The trait is enabled by default when the Knative profile is active.
This trait is available in the following profiles: Knative.
Configuration
Trait properties can be specified when running any integration with the CLI:
$ kamel run --trait knative.[key]=[value] --trait knative.[key2]=[value2] integration.groovy
The following configuration options are available:
Property | Type | Description |
---|---|---|
|
| Can be used to enable or disable a trait. All traits share this common property. |
|
| Can be used to inject a Knative complete configuration in JSON format. |
|
| List of channels used as source of integration routes. Can contain simple channel names or full Camel URIs. |
|
| List of channels used as destination of integration routes. Can contain simple channel names or full Camel URIs. |
|
| List of channels used as source of integration routes. |
|
| List of endpoints used as destination of integration routes. Can contain simple endpoint names or full Camel URIs. |
|
| List of event types that the integration will be subscribed to. Can contain simple event types or full Camel URIs (to use a specific broker different from "default"). |
|
| List of event types that the integration will produce. Can contain simple event types or full Camel URIs (to use a specific broker). |
|
| Enables filtering on events based on the header "ce-knativehistory". Since this header has been removed in newer versions of Knative, filtering is disabled by default. |
|
| Allows binding the integration to a sink via a Knative SinkBinding resource. This can be used when the integration targets a single sink. It’s enabled by default when the integration targets a single sink (except when the integration is owned by a Knative source). |
|
| Enable automatic discovery of all trait properties. |
|
| Enables the camel-k-operator to set the "bindings.knative.dev/include=true" label to the namespace As Knative requires this label to perform injection of K_SINK URL into the service. If this is false, the integration pod may start and fail, read the SinkBinding Knative documentation. (default: true) |