Container Trait

The Container trait can be used to configure properties of the container where the integration will run.

It also provides configuration for Services associated to the container.

This trait is available in the following profiles: Kubernetes, Knative, OpenShift.

The container trait is a platform trait and cannot be disabled by the user.

Configuration

Trait properties can be specified when running any integration with the CLI:

$ kamel run --trait container.[key]=[value] --trait container.[key2]=[value2] integration.yaml

The following configuration options are available:

Property Type Description

container.enabled

bool

Deprecated: no longer in use.

container.auto

bool

To automatically enable the trait

container.request-cpu

string

The minimum amount of CPU required (default 125 millicores).

container.request-memory

string

The minimum amount of memory required (default 128 Mi).

container.limit-cpu

string

The maximum amount of CPU to be provided (default 500 millicores).

container.limit-memory

string

The maximum amount of memory to be provided (default 512 Mi).

container.expose

bool

Can be used to enable/disable exposure via kubernetes Service.

container.port

int

To configure a different port exposed by the container (default 8080).

container.port-name

string

To configure a different port name for the port exposed by the container. It defaults to http only when the expose parameter is true.

container.service-port

int

To configure under which service port the container port is to be exposed (default 80).

container.service-port-name

string

To configure under which service port name the container port is to be exposed (default http).

container.name

string

The main container name. It’s named integration by default.

container.image

string

The main container image to use for the Integration. When using this parameter the operator will create a synthetic IntegrationKit which won’t be able to execute traits requiring CamelCatalog. If the container image you’re using is coming from an IntegrationKit, use instead Integration .spec.integrationKit parameter. If you’re moving the Integration across environments, you will also need to create an "external" IntegrationKit.

container.image-pull-policy

PullPolicy

The pull policy: Always|Never|IfNotPresent

container.run-as-user

int64

Security Context RunAsUser configuration (default none): this value is automatically retrieved in Openshift clusters when not explicitly set.

container.run-as-non-root

bool

Security Context RunAsNonRoot configuration (default false).

container.seccomp-profile-type

SeccompProfileType

Security Context SeccompProfileType configuration (default RuntimeDefault).

container.allow-privilege-escalation

bool

Security Context AllowPrivilegeEscalation configuration (default false).

container.capabilities-drop

[]k8s.io/api/core/v1.Capability

Security Context Capabilities Drop configuration (default ALL).

container.capabilities-add

[]k8s.io/api/core/v1.Capability

Security Context Capabilities Add configuration (default none).