Builder Trait

The builder trait is internally used to determine the best strategy to build and configure IntegrationKits.

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

The builder 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 builder.[key]=[value] --trait builder.[key2]=[value2] integration.groovy

The following configuration options are available:

Property Type Description

builder.enabled

bool

Deprecated: no longer in use.

builder.verbose

bool

Enable verbose logging on build components that support it (e.g. Kaniko build pod).

builder.properties

[]string

A list of properties to be provided to the build task

builder.strategy

string

The strategy to use, either pod or routine (default routine)

builder.base-image

string

Specify a base image

builder.incremental-image-build

bool

Use the incremental image build option, to reuse existing containers (default true)

builder.order-strategy

string

The build order strategy to use, either dependencies, fifo or sequential (default sequential)

builder.request-cpu

string

When using pod strategy, the minimum amount of CPU required by the pod builder. Deprecated: use TasksRequestCPU instead with task name builder.

builder.request-memory

string

When using pod strategy, the minimum amount of memory required by the pod builder. Deprecated: use TasksRequestCPU instead with task name builder.

builder.limit-cpu

string

When using pod strategy, the maximum amount of CPU required by the pod builder. Deprecated: use TasksRequestCPU instead with task name builder.

builder.limit-memory

string

When using pod strategy, the maximum amount of memory required by the pod builder. Deprecated: use TasksRequestCPU instead with task name builder.

builder.maven-profiles

[]string

A list of references pointing to configmaps/secrets that contains a maven profile. The content of the maven profile is expected to be a text containing a valid maven profile starting with <profile> and ending with </profile> that will be integrated as an inline profile in the POM. Syntax: [configmap|secret]:name[/key], where name represents the resource name, key optionally represents the resource key to be filtered (default key value = profile.xml).

builder.tasks

[]string

A list of tasks to be executed (available only when using pod strategy) with format <name>;<container-image>;<container-command>.

builder.tasks-request-cpu

[]string

A list of request cpu configuration for the specific task with format <task-name>:<request-cpu-conf>.

builder.tasks-request-memory

[]string

A list of request memory configuration for the specific task with format <task-name>:<request-memory-conf>.

builder.tasks-limit-cpu

[]string

A list of limit cpu configuration for the specific task with format <task-name>:<limit-cpu-conf>.

builder.tasks-limit-memory

[]string

A list of limit memory configuration for the specific task with format <task-name>:<limit-memory-conf>.

builder.node-selector

map[string]string

Defines a set of nodes the builder pod is eligible to be scheduled on, based on labels on the node.

Node Selectors

With this trait you will also be able to define node selectors for the builder pod when using the pod` build strategy. Here is a simple example:

template.yaml
  traits:
    builder:
      nodeSelector:
        size: large

The builder pod will be created with a node selector that allows it to run only on nodes where the size label is equal to large.

Node selectors can be specified when running an integration with the CLI:

$ kamel run --trait builder.node-selector.'size'=large integration.groovy