= Container Trait

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

WARNING: The container trait is a *platform trait*: disabling it may compromise the platform functionality.

// 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 container.[key]=[value] --trait container.[key2]=[value2] integration.groovy
----
The following configuration options are available:

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

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

| container.auto
| bool
| To automatically enable the trait

| container.request-cpu
| string
| The minimum amount of CPU required.

| container.request-memory
| string
| The minimum amount of memory required.

| container.limit-cpu
| string
| The maximum amount of CPU required.

| container.limit-memory
| string
| The maximum amount of memory required.

| 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

| container.image-pull-policy
| PullPolicy
| The pull policy: Always\|Never\|IfNotPresent

| container.probes-enabled
| bool
| DeprecatedProbesEnabled enable/disable probes on the container (default `false`).
Deprecated: replaced by the health trait.

| container.liveness-scheme
| string
| Scheme to use when connecting. Defaults to HTTP. Applies to the liveness probe.
Deprecated: replaced by the health trait.

| container.liveness-initial-delay
| int32
| Number of seconds after the container has started before liveness probes are initiated.
Deprecated: replaced by the health trait.

| container.liveness-timeout
| int32
| Number of seconds after which the probe times out. Applies to the liveness probe.
Deprecated: replaced by the health trait.

| container.liveness-period
| int32
| How often to perform the probe. Applies to the liveness probe.
Deprecated: replaced by the health trait.

| container.liveness-success-threshold
| int32
| Minimum consecutive successes for the probe to be considered successful after having failed.
Applies to the liveness probe.
Deprecated: replaced by the health trait.

| container.liveness-failure-threshold
| int32
| Minimum consecutive failures for the probe to be considered failed after having succeeded.
Applies to the liveness probe.
Deprecated: replaced by the health trait.

| container.readiness-scheme
| string
| Scheme to use when connecting. Defaults to HTTP. Applies to the readiness probe.
Deprecated: replaced by the health trait.

| container.readiness-initial-delay
| int32
| Number of seconds after the container has started before readiness probes are initiated.
Deprecated: replaced by the health trait.

| container.readiness-timeout
| int32
| Number of seconds after which the probe times out. Applies to the readiness probe.
Deprecated: replaced by the health trait.

| container.readiness-period
| int32
| How often to perform the probe. Applies to the readiness probe.
Deprecated: replaced by the health trait.

| container.readiness-success-threshold
| int32
| Minimum consecutive successes for the probe to be considered successful after having failed.
Applies to the readiness probe.
Deprecated: replaced by the health trait.

| container.readiness-failure-threshold
| int32
| Minimum consecutive failures for the probe to be considered failed after having succeeded.
Applies to the readiness probe.
Deprecated: replaced by the health trait.

|===

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