Integration Profiles
Admin users may add an IntegrationProfile resource to any namespace. The profile holds custom settings which can be applied to Integrations.
Profile Resolution Precedence
The operator resolves the IntegrationProfile to apply to an Integration (or Pipe) using the following order of precedence:
-
User-provided profile (via resource annotation): The resource specifies the profile name in the
camel.apache.org/integration-profile.idannotation. -
Namespace-annotated profile (via namespace annotation): If the resource has no annotation, the operator checks if the Kubernetes
Namespacehas acamel.apache.org/integration-profile.idannotation designating the default profile for that namespace. -
defaultprofile convention: If neither the resource nor the namespace is annotated, the operator looks for anIntegrationProfilenameddefaultin the same namespace. -
Default operator configuration: If no profile is found, the operator falls back to its baseline configuration configured via operator environment variables.
Explicit Selection (Resource Annotation)
To specify which profile should be used for an Integration, the resource can be annotated like in the following example:
kind: Integration
apiVersion: camel.apache.org/v1
metadata:
annotations:
camel.apache.org/integration-profile.id: my-profile
# ... The value of the camel.apache.org/integration-profile.id annotation must match the name of an IntegrationProfile custom resource which is available in the same namespace of the Integration. Here an example of a profile:
kind: IntegrationProfile
apiVersion: camel.apache.org/v1
metadata:
name: my-profile
spec:
traits:
camel:
runtimeProvider: plain-quarkus
runtimeVersion: 3.30.8
owner:
targetLabels:
- camel.apache.org/app
...
# ... Namespace Default (Namespace Annotation)
Administrators can set a default profile for all integrations in a namespace by annotating the Kubernetes Namespace:
kind: Namespace
apiVersion: v1
metadata:
name: my-team
annotations:
camel.apache.org/integration-profile.id: my-team-profile Any Integration created in my-team without an explicit profile annotation will automatically use my-team-profile.
The administrator must also create the IntegrationProfile named my-team-profile in that namespace. If it does not exist, the operator will fail to resolve the profile and report an error. For example: |
kind: IntegrationProfile
apiVersion: camel.apache.org/v1
metadata:
name: my-team-profile
namespace: my-team
spec:
traits:
camel:
runtimeProvider: plain-quarkus Default Profile Convention
Alternatively, an administrator can simply create an IntegrationProfile named default in the namespace:
kind: IntegrationProfile
apiVersion: camel.apache.org/v1
metadata:
name: default
spec:
traits:
camel:
runtimeProvider: plain-quarkus Any Integration deployed into this namespace without an explicit annotation will automatically use this default profile.
The selection of an IntegrationProfile enables new configuration scenarios, for example, sharing global configuration options for groups of Integrations.
Security
The IntegrationProfile is the secure way to provide sensitive building information and common configuration. For example, you can provide a common security configuration to access securely to a container registry. Or, as seen above a common runtime configuration (traits) to adopt. The profile contains all the configuration required for the operator to build, package and run the application. Here a quick snapshot of the main parameters (see more in the API definition):
kind: IntegrationProfile
apiVersion: camel.apache.org/v1
metadata:
name: my-profile
spec:
build:
...
registry:
...
maven:
...
repositories:
...
dependencies:
...
traits:
... The presence of the profile overrides the default operator configuration which is normally configured via environment variables.
| each Integration can use any IntegrationProfile available in their namespace. |