Master Trait
The Master trait allows to configure the integration to automatically leverage Kubernetes resources for doing leader election and starting master routes only on certain instances.
It’s activated automatically when using the master endpoint in a route, e.g. from("master:lockname:telegram:bots")…
.
this trait adds special permissions to the integration service account in order to read/write configmaps and read pods. It’s recommended to use a different service account than "default" when running the integration. |
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 master.[key]=[value] --trait master.[key2]=[value2] integration.yaml
The following configuration options are available:
Property | Type | Description |
---|---|---|
|
| Can be used to enable or disable a trait. All traits share this common property. |
|
| Enables automatic configuration of the trait. |
|
| When this flag is active, the operator analyzes the source code to add dependencies required by delegate endpoints. E.g. when using |
|
| Name of the configmap that will be used to store the lock. Defaults to "<integration-name>-lock". Name of the configmap/lease resource that will be used to store the lock. Defaults to "<integration-name>-lock". |
|
| Type of Kubernetes resource to use for locking ("ConfigMap" or "Lease"). Defaults to "Lease". |
|
| Label that will be used to identify all pods contending the lock. Defaults to "camel.apache.org/integration". |
|
| Label value that will be used to identify all pods contending the lock. Defaults to the integration name. |