= Knative Trait

// 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 full Knative configuration is injected in the CAMEL_KNATIVE_CONFIGURATION in JSON format.
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.groovy
----
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)

|===

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