= Knative Trait

// Start of autogenerated code - DO NOT EDIT! (badges)
// End of autogenerated code - DO NOT EDIT! (badges)
// Start of autogenerated code - DO NOT EDIT! (description)
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**.

// End of autogenerated code - DO NOT EDIT! (description)
// Start of autogenerated code - DO NOT EDIT! (configuration)
== Configuration

Trait properties can be specified when running any integration with the CLI:
[source,console]
----
$ kamel run --trait knative.[key]=[value] --trait knative.[key2]=[value2] integration.yaml
----
The following configuration options are available:

[cols="2m,1m,5a"]
|===
|Property | Type | Description

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

| knative.configuration
| string
| Can be used to inject a Knative complete configuration in JSON format.

| knative.channel-sources
| []string
| List of channels used as source of integration routes.
Can contain simple channel names or full Camel URIs.

| knative.channel-sinks
| []string
| List of channels used as destination of integration routes.
Can contain simple channel names or full Camel URIs.

| knative.endpoint-sources
| []string
| List of channels used as source of integration routes.

| knative.endpoint-sinks
| []string
| List of endpoints used as destination of integration routes.
Can contain simple endpoint names or full Camel URIs.

| knative.event-sources
| []string
| 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").

| knative.event-sinks
| []string
| List of event types that the integration will produce.
Can contain simple event types or full Camel URIs (to use a specific broker).

| knative.filter-source-channels
| bool
| 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.

| knative.sink-binding
| bool
| 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).

| knative.auto
| bool
| Enable automatic discovery of all trait properties.

| knative.namespace-label
| bool
| 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)

| knative.filters
| []string
| Sets filter attributes on the event stream (such as event type, source, subject and so on).
A list of key-value pairs that represent filter attributes and its values.
The syntax is KEY=VALUE, e.g., `source="my.source"`.
Filter attributes get set on the Knative trigger that is being created as part of this integration.

| knative.filter-event-type
| bool
| Enables the default filtering for the Knative trigger using the event type
If this is true, the created Knative trigger uses the event type as a filter on the event stream when no other filter criteria is given. (default: true)

|===

// End of autogenerated code - DO NOT EDIT! (configuration)
