trait

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package trait contains Trait API Schema definitions for the camel v1 API group +kubebuilder:object:generate=true +groupName=camel.apache.org

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AffinityTrait

type AffinityTrait struct {
	Trait `property:",squash" json:",inline"`
	// Always co-locates multiple replicas of the integration in the same node (default *false*).
	PodAffinity *bool `property:"pod-affinity" json:"podAffinity,omitempty"`
	// Never co-locates multiple replicas of the integration in the same node (default *false*).
	PodAntiAffinity *bool `property:"pod-anti-affinity" json:"podAntiAffinity,omitempty"`
	// Defines a set of nodes the integration pod(s) are eligible to be scheduled on, based on labels on the node.
	NodeAffinityLabels []string `property:"node-affinity-labels" json:"nodeAffinityLabels,omitempty"`
	// Defines a set of pods (namely those matching the label selector, relative to the given namespace) that the
	// integration pod(s) should be co-located with.
	PodAffinityLabels []string `property:"pod-affinity-labels" json:"podAffinityLabels,omitempty"`
	// Defines a set of pods (namely those matching the label selector, relative to the given namespace) that the
	// integration pod(s) should not be co-located with.
	PodAntiAffinityLabels []string `property:"pod-anti-affinity-labels" json:"podAntiAffinityLabels,omitempty"`
}

Allows constraining which nodes the integration pod(s) are eligible to be scheduled on, based on labels on the node, or with inter-pod affinity and anti-affinity, based on labels on pods that are already running on the nodes.

It's disabled by default.

+camel-k:trait=affinity.

func (*AffinityTrait) DeepCopy

func (in *AffinityTrait) DeepCopy() *AffinityTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AffinityTrait.

func (*AffinityTrait) DeepCopyInto

func (in *AffinityTrait) DeepCopyInto(out *AffinityTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BuilderTrait

type BuilderTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// Enable verbose logging on build components that support it (e.g. Kaniko build pod).
	Verbose *bool `property:"verbose" json:"verbose,omitempty"`
	// A list of properties to be provided to the build task
	Properties []string `property:"properties" json:"properties,omitempty"`
	// The strategy to use, either `pod` or `routine` (default routine)
	Strategy string `property:"strategy" json:"strategy,omitempty"`
	// Use the incremental image build option, to reuse existing containers (default `true`)
	IncrementalImageBuild *bool `property:"incremental-image-build" json:"incrementalImageBuild,omitempty"`
	// The build order strategy to use, either `dependencies`, `fifo` or `sequential` (default sequential)
	OrderStrategy string `property:"order-strategy" json:"orderStrategy,omitempty"`
	// When using `pod` strategy, the minimum amount of CPU required by the pod builder.
	// Deprecated: use TasksRequestCPU instead with task name `builder`.
	RequestCPU string `property:"request-cpu" json:"requestCPU,omitempty"`
	// When using `pod` strategy, the minimum amount of memory required by the pod builder.
	// Deprecated: use TasksRequestCPU instead with task name `builder`.
	RequestMemory string `property:"request-memory" json:"requestMemory,omitempty"`
	// When using `pod` strategy, the maximum amount of CPU required by the pod builder.
	// Deprecated: use TasksRequestCPU instead with task name `builder`.
	LimitCPU string `property:"limit-cpu" json:"limitCPU,omitempty"`
	// When using `pod` strategy, the maximum amount of memory required by the pod builder.
	// Deprecated: use TasksRequestCPU instead with task name `builder`.
	LimitMemory string `property:"limit-memory" json:"limitMemory,omitempty"`
	// 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).
	MavenProfiles []string `property:"maven-profiles" json:"mavenProfiles,omitempty"`
	// A list of tasks to be executed (available only when using `pod` strategy) with format `<name>;<container-image>;<container-command>`.
	Tasks []string `property:"tasks" json:"tasks,omitempty"`
	// A list of request cpu configuration for the specific task with format `<task-name>:<request-cpu-conf>`.
	TasksRequestCPU []string `property:"tasks-request-cpu" json:"tasksRequestCPU,omitempty"`
	// A list of request memory configuration for the specific task with format `<task-name>:<request-memory-conf>`.
	TasksRequestMemory []string `property:"tasks-request-memory" json:"tasksRequestMemory,omitempty"`
	// A list of limit cpu configuration for the specific task with format `<task-name>:<limit-cpu-conf>`.
	TasksLimitCPU []string `property:"tasks-limit-cpu" json:"tasksLimitCPU,omitempty"`
	// A list of limit memory configuration for the specific task with format `<task-name>:<limit-memory-conf>`.
	TasksLimitMemory []string `property:"tasks-limit-memory" json:"tasksLimitMemory,omitempty"`
}

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

+camel-k:trait=builder.

func (*BuilderTrait) DeepCopy

func (in *BuilderTrait) DeepCopy() *BuilderTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuilderTrait.

func (*BuilderTrait) DeepCopyInto

func (in *BuilderTrait) DeepCopyInto(out *BuilderTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CamelTrait

type CamelTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// The camel-k-runtime version to use for the integration. It overrides the default version set in the Integration Platform.
	RuntimeVersion string `property:"runtime-version" json:"runtimeVersion,omitempty"`
	// A list of properties to be provided to the Integration runtime
	Properties []string `property:"properties" json:"properties,omitempty"`
}

The Camel trait can be used to configure versions of Apache Camel K runtime and related libraries, it cannot be disabled.

+camel-k:trait=camel.

func (*CamelTrait) DeepCopy

func (in *CamelTrait) DeepCopy() *CamelTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CamelTrait.

func (*CamelTrait) DeepCopyInto

func (in *CamelTrait) DeepCopyInto(out *CamelTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Configuration

type Configuration struct {
	RawMessage `json:",inline"`
}

Configuration defines the trait structure Deprecated: for backward compatibility.

func (*Configuration) DeepCopy

func (in *Configuration) DeepCopy() *Configuration

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.

func (*Configuration) DeepCopyInto

func (in *Configuration) DeepCopyInto(out *Configuration)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContainerTrait

type ContainerTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// To automatically enable the trait
	Auto *bool `property:"auto" json:"auto,omitempty"`
	// The minimum amount of CPU required.
	RequestCPU string `property:"request-cpu" json:"requestCPU,omitempty"`
	// The minimum amount of memory required.
	RequestMemory string `property:"request-memory" json:"requestMemory,omitempty"`
	// The maximum amount of CPU required.
	LimitCPU string `property:"limit-cpu" json:"limitCPU,omitempty"`
	// The maximum amount of memory required.
	LimitMemory string `property:"limit-memory" json:"limitMemory,omitempty"`
	// Can be used to enable/disable exposure via kubernetes Service.
	Expose *bool `property:"expose" json:"expose,omitempty"`
	// To configure a different port exposed by the container (default `8080`).
	Port int `property:"port" json:"port,omitempty"`
	// To configure a different port name for the port exposed by the container. It defaults to `http` only when the `expose` parameter is true.
	PortName string `property:"port-name" json:"portName,omitempty"`
	// To configure under which service port the container port is to be exposed (default `80`).
	ServicePort int `property:"service-port" json:"servicePort,omitempty"`
	// To configure under which service port name the container port is to be exposed (default `http`).
	ServicePortName string `property:"service-port-name" json:"servicePortName,omitempty"`
	// The main container name. It's named `integration` by default.
	Name string `property:"name" json:"name,omitempty"`
	// The main container image
	Image string `property:"image" json:"image,omitempty"`
	// The pull policy: Always|Never|IfNotPresent
	// +kubebuilder:validation:Enum=Always;Never;IfNotPresent
	ImagePullPolicy corev1.PullPolicy `property:"image-pull-policy" json:"imagePullPolicy,omitempty"`
}

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.

+camel-k:trait=container nolint: tagliatelle

func (*ContainerTrait) DeepCopy

func (in *ContainerTrait) DeepCopy() *ContainerTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerTrait.

func (*ContainerTrait) DeepCopyInto

func (in *ContainerTrait) DeepCopyInto(out *ContainerTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CronTrait

type CronTrait struct {
	Trait `property:",squash" json:",inline"`
	// The CronJob schedule for the whole integration. If multiple routes are declared, they must have the same schedule for this
	// mechanism to work correctly.
	Schedule string `property:"schedule" json:"schedule,omitempty"`
	// A comma separated list of the Camel components that need to be customized in order for them to work when the schedule is triggered externally by Kubernetes.
	// A specific customizer is activated for each specified component. E.g. for the `timer` component, the `cron-timer` customizer is
	// activated (it's present in the `org.apache.camel.k:camel-k-cron` library).
	//
	// Supported components are currently: `cron`, `timer` and `quartz`.
	Components string `property:"components" json:"components,omitempty"`
	// Use the default Camel implementation of the `cron` endpoint (`quartz`) instead of trying to materialize the integration
	// as Kubernetes CronJob.
	Fallback *bool `property:"fallback" json:"fallback,omitempty"`
	// Specifies how to treat concurrent executions of a Job.
	// Valid values are:
	// - "Allow": allows CronJobs to run concurrently;
	// - "Forbid" (default): forbids concurrent runs, skipping next run if previous run hasn't finished yet;
	// - "Replace": cancels currently running job and replaces it with a new one
	// +kubebuilder:validation:Enum=Allow;Forbid;Replace
	ConcurrencyPolicy string `property:"concurrency-policy" json:"concurrencyPolicy,omitempty"`
	// Automatically deploy the integration as CronJob when all routes are
	// either starting from a periodic consumer (only `cron`, `timer` and `quartz` are supported) or a passive consumer (e.g. `direct` is a passive consumer).
	//
	// It's required that all periodic consumers have the same period, and it can be expressed as cron schedule (e.g. `1m` can be expressed as `0/1 * * * *`,
	// while `35m` or `50s` cannot).
	Auto *bool `property:"auto" json:"auto,omitempty"`
	// Optional deadline in seconds for starting the job if it misses scheduled
	// time for any reason.  Missed jobs executions will be counted as failed ones.
	StartingDeadlineSeconds *int64 `property:"starting-deadline-seconds" json:"startingDeadlineSeconds,omitempty"`
	// Specifies the duration in seconds, relative to the start time, that the job
	// may be continuously active before it is considered to be failed.
	// It defaults to 60s.
	ActiveDeadlineSeconds *int64 `property:"active-deadline-seconds" json:"activeDeadlineSeconds,omitempty"`
	// Specifies the number of retries before marking the job failed.
	// It defaults to 2.
	BackoffLimit *int32 `property:"backoff-limit" json:"backoffLimit,omitempty"`
}

The Cron trait can be used to customize the behaviour of periodic timer/cron based integrations.

While normally an integration requires a pod to be always up and running, some periodic tasks, such as batch jobs, require to be activated at specific hours of the day or with a periodic delay of minutes. For such tasks, the cron trait can materialize the integration as a Kubernetes CronJob instead of a standard deployment, in order to save resources when the integration does not need to be executed.

Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`.

The rules for using a Kubernetes CronJob are the following:

  • `timer`: when period is set in milliseconds with no remaining seconds, for example 120000. If there is any second left as in 121000 (120s and 1s) or the presence of any of these parameters (delay, repeatCount, time) then a CronJob won't be created, but a standard deployment.

  • `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.

    `cron:tab?schedule=0/2${plus}*{plus}*{plus}*{plus}?` or `quartz:trigger?cron=0{plus}0/2{plus}*{plus}*{plus}*{plus}?`.

+camel-k:trait=cron.

func (*CronTrait) DeepCopy

func (in *CronTrait) DeepCopy() *CronTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronTrait.

func (*CronTrait) DeepCopyInto

func (in *CronTrait) DeepCopyInto(out *CronTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DependenciesTrait

type DependenciesTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
}

The Dependencies trait is internally used to automatically add runtime dependencies based on the integration that the user wants to run.

+camel-k:trait=dependencies.

func (*DependenciesTrait) DeepCopy

func (in *DependenciesTrait) DeepCopy() *DependenciesTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DependenciesTrait.

func (*DependenciesTrait) DeepCopyInto

func (in *DependenciesTrait) DeepCopyInto(out *DependenciesTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeployerTrait

type DeployerTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// Allows to explicitly select the desired deployment kind between `deployment`, `cron-job` or `knative-service` when creating the resources for running the integration.
	// +kubebuilder:validation:Enum=deployment;cron-job;knative-service
	Kind string `property:"kind" json:"kind,omitempty"`
	// Use server-side apply to update the owned resources (default `true`).
	// Note that it automatically falls back to client-side patching, if SSA is not available, e.g., on old Kubernetes clusters.
	UseSSA *bool `property:"use-ssa" json:"useSSA,omitempty"`
}

The deployer trait is responsible for deploying the resources owned by the integration, and can be used to explicitly select the underlying controller that will manage the integration pods.

+camel-k:trait=deployer.

func (*DeployerTrait) DeepCopy

func (in *DeployerTrait) DeepCopy() *DeployerTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerTrait.

func (*DeployerTrait) DeepCopyInto

func (in *DeployerTrait) DeepCopyInto(out *DeployerTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DeploymentTrait

type DeploymentTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// The maximum time in seconds for the deployment to make progress before it
	// is considered to be failed. It defaults to 60s.
	ProgressDeadlineSeconds *int32 `property:"progress-deadline-seconds" json:"progressDeadlineSeconds,omitempty"`
	// The deployment strategy to use to replace existing pods with new ones.
	// +kubebuilder:validation:Enum=Recreate;RollingUpdate
	Strategy appsv1.DeploymentStrategyType `property:"strategy" json:"strategy,omitempty"`
	// The maximum number of pods that can be unavailable during the update.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	// Absolute number is calculated from percentage by rounding down.
	// This can not be 0 if MaxSurge is 0.
	// Defaults to 25%.
	RollingUpdateMaxUnavailable *int `property:"rolling-update-max-unavailable" json:"rollingUpdateMaxUnavailable,omitempty"`
	// The maximum number of pods that can be scheduled above the desired number of
	// pods.
	// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
	// This can not be 0 if MaxUnavailable is 0.
	// Absolute number is calculated from percentage by rounding up.
	// Defaults to 25%.
	RollingUpdateMaxSurge *int `property:"rolling-update-max-surge" json:"rollingUpdateMaxSurge,omitempty"`
}

The Deployment trait is responsible for generating the Kubernetes deployment that will make sure the integration will run in the cluster.

+camel-k:trait=deployment.

func (*DeploymentTrait) DeepCopy

func (in *DeploymentTrait) DeepCopy() *DeploymentTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTrait.

func (*DeploymentTrait) DeepCopyInto

func (in *DeploymentTrait) DeepCopyInto(out *DeploymentTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiscoveryCacheType

type DiscoveryCacheType string

+kubebuilder:validation:Enum=disabled;disk;memory

const (
	DisabledDiscoveryCache DiscoveryCacheType = "disabled"
	DiskDiscoveryCache     DiscoveryCacheType = "disk"
	MemoryDiscoveryCache   DiscoveryCacheType = "memory"
)

type EnvironmentTrait

type EnvironmentTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// Enables injection of `NAMESPACE` and `POD_NAME` environment variables (default `true`)
	ContainerMeta *bool `property:"container-meta" json:"containerMeta,omitempty"`
	// Propagates the `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables (default `true`)
	HTTPProxy *bool `property:"http-proxy" json:"httpProxy,omitempty"`
	// A list of environment variables to be added to the integration container.
	// The syntax is KEY=VALUE, e.g., `MY_VAR="my value"`.
	// These take precedence over the previously defined environment variables.
	Vars []string `property:"vars" json:"vars,omitempty"`
}

The environment trait is used internally to inject standard environment variables in the integration container, such as `NAMESPACE`, `POD_NAME` and others.

+camel-k:trait=environment.

func (*EnvironmentTrait) DeepCopy

func (in *EnvironmentTrait) DeepCopy() *EnvironmentTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentTrait.

func (*EnvironmentTrait) DeepCopyInto

func (in *EnvironmentTrait) DeepCopyInto(out *EnvironmentTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ErrorHandlerTrait

type ErrorHandlerTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// The error handler ref name provided or found in application properties
	ErrorHandlerRef string `property:"ref" json:"ref,omitempty"`
}

The error-handler is a platform trait used to inject Error Handler source into the integration runtime.

+camel-k:trait=error-handler.

func (*ErrorHandlerTrait) DeepCopy

func (in *ErrorHandlerTrait) DeepCopy() *ErrorHandlerTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ErrorHandlerTrait.

func (*ErrorHandlerTrait) DeepCopyInto

func (in *ErrorHandlerTrait) DeepCopyInto(out *ErrorHandlerTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GCTrait

type GCTrait struct {
	Trait `property:",squash" json:",inline"`
	// Discovery client cache to be used, either `disabled`, `disk` or `memory` (default `memory`).
	// Deprecated: to be removed from trait configuration.
	DiscoveryCache *DiscoveryCacheType `property:"discovery-cache" json:"discoveryCache,omitempty"`
}

The GC Trait garbage-collects all resources that are no longer necessary upon integration updates.

+camel-k:trait=gc.

func (*GCTrait) DeepCopy

func (in *GCTrait) DeepCopy() *GCTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCTrait.

func (*GCTrait) DeepCopyInto

func (in *GCTrait) DeepCopyInto(out *GCTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HealthTrait

type HealthTrait struct {
	Trait `property:",squash" json:",inline"`

	// Configures the liveness probe for the integration container (default `false`).
	LivenessProbeEnabled *bool `property:"liveness-probe-enabled" json:"livenessProbeEnabled,omitempty"`
	// Scheme to use when connecting to the liveness probe (default `HTTP`).
	LivenessScheme string `property:"liveness-scheme" json:"livenessScheme,omitempty"`
	// Number of seconds after the container has started before the liveness probe is initiated.
	LivenessInitialDelay int32 `property:"liveness-initial-delay" json:"livenessInitialDelay,omitempty"`
	// Number of seconds after which the liveness probe times out.
	LivenessTimeout int32 `property:"liveness-timeout" json:"livenessTimeout,omitempty"`
	// How often to perform the liveness probe.
	LivenessPeriod int32 `property:"liveness-period" json:"livenessPeriod,omitempty"`
	// Minimum consecutive successes for the liveness probe to be considered successful after having failed.
	LivenessSuccessThreshold int32 `property:"liveness-success-threshold" json:"livenessSuccessThreshold,omitempty"`
	// Minimum consecutive failures for the liveness probe to be considered failed after having succeeded.
	LivenessFailureThreshold int32 `property:"liveness-failure-threshold" json:"livenessFailureThreshold,omitempty"`

	// Configures the readiness probe for the integration container (default `true`).
	ReadinessProbeEnabled *bool `property:"readiness-probe-enabled" json:"readinessProbeEnabled,omitempty"`
	// Scheme to use when connecting to the readiness probe (default `HTTP`).
	ReadinessScheme string `property:"readiness-scheme" json:"readinessScheme,omitempty"`
	// Number of seconds after the container has started before the readiness probe is initiated.
	ReadinessInitialDelay int32 `property:"readiness-initial-delay" json:"readinessInitialDelay,omitempty"`
	// Number of seconds after which the readiness probe times out.
	ReadinessTimeout int32 `property:"readiness-timeout" json:"readinessTimeout,omitempty"`
	// How often to perform the readiness probe.
	ReadinessPeriod int32 `property:"readiness-period" json:"readinessPeriod,omitempty"`
	// Minimum consecutive successes for the readiness probe to be considered successful after having failed.
	ReadinessSuccessThreshold int32 `property:"readiness-success-threshold" json:"readinessSuccessThreshold,omitempty"`
	// Minimum consecutive failures for the readiness probe to be considered failed after having succeeded.
	ReadinessFailureThreshold int32 `property:"readiness-failure-threshold" json:"readinessFailureThreshold,omitempty"`

	// Configures the startup probe for the integration container (default `false`).
	StartupProbeEnabled *bool `property:"startup-probe-enabled" json:"startupProbeEnabled,omitempty"`
	// Scheme to use when connecting to the startup probe (default `HTTP`).
	StartupScheme string `property:"startup-scheme" json:"startupScheme,omitempty"`
	// Number of seconds after the container has started before the startup probe is initiated.
	StartupInitialDelay int32 `property:"startup-initial-delay" json:"startupInitialDelay,omitempty"`
	// Number of seconds after which the startup probe times out.
	StartupTimeout int32 `property:"startup-timeout" json:"startupTimeout,omitempty"`
	// How often to perform the startup probe.
	StartupPeriod int32 `property:"startup-period" json:"startupPeriod,omitempty"`
	// Minimum consecutive successes for the startup probe to be considered successful after having failed.
	StartupSuccessThreshold int32 `property:"startup-success-threshold" json:"startupSuccessThreshold,omitempty"`
	// Minimum consecutive failures for the startup probe to be considered failed after having succeeded.
	StartupFailureThreshold int32 `property:"startup-failure-threshold" json:"startupFailureThreshold,omitempty"`
}

The health trait is responsible for configuring the health probes on the integration container.

It's disabled by default.

+camel-k:trait=health.

func (*HealthTrait) DeepCopy

func (in *HealthTrait) DeepCopy() *HealthTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthTrait.

func (*HealthTrait) DeepCopyInto

func (in *HealthTrait) DeepCopyInto(out *HealthTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IngressTrait

type IngressTrait struct {
	Trait `property:",squash" json:",inline"`
	// The annotations added to the ingress.
	// This can be used to set controller specific annotations, e.g., when using the NGINX Ingress controller:
	// See https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/annotations.md
	Annotations map[string]string `property:"annotations" json:"annotations,omitempty"`
	// To configure the host exposed by the ingress.
	Host string `property:"host" json:"host,omitempty"`
	// To configure the path exposed by the ingress (default `/`).
	Path string `property:"path" json:"path,omitempty"`
	// To configure the path type exposed by the ingress.
	// One of `Exact`, `Prefix`, `ImplementationSpecific` (default to `Prefix`).
	// +kubebuilder:validation:Enum=Exact;Prefix;ImplementationSpecific
	PathType *networkingv1.PathType `property:"path-type" json:"pathType,omitempty"`
	// To automatically add an ingress whenever the integration uses an HTTP endpoint consumer.
	Auto *bool `property:"auto" json:"auto,omitempty"`
}

The Ingress trait can be used to expose the service associated with the integration to the outside world with a Kubernetes Ingress.

It's enabled by default whenever a Service is added to the integration (through the `service` trait).

+camel-k:trait=ingress.

func (*IngressTrait) DeepCopy

func (in *IngressTrait) DeepCopy() *IngressTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressTrait.

func (*IngressTrait) DeepCopyInto

func (in *IngressTrait) DeepCopyInto(out *IngressTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type IstioTrait

type IstioTrait struct {
	Trait `property:",squash" json:",inline"`
	// Configures a (comma-separated) list of CIDR subnets that should not be intercepted by the Istio proxy (`10.0.0.0/8,172.16.0.0/12,192.168.0.0/16` by default).
	Allow string `property:"allow" json:"allow,omitempty"`
	// Forces the value for labels `sidecar.istio.io/inject`. By default the label is set to `true` on deployment and not set on Knative Service.
	Inject *bool `property:"inject" json:"inject,omitempty"`
}

The Istio trait allows configuring properties related to the Istio service mesh, such as sidecar injection and outbound IP ranges.

+camel-k:trait=istio.

func (*IstioTrait) DeepCopy

func (in *IstioTrait) DeepCopy() *IstioTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IstioTrait.

func (*IstioTrait) DeepCopyInto

func (in *IstioTrait) DeepCopyInto(out *IstioTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JVMTrait

type JVMTrait struct {
	Trait `property:",squash" json:",inline"`
	// Activates remote debugging, so that a debugger can be attached to the JVM, e.g., using port-forwarding
	Debug *bool `property:"debug" json:"debug,omitempty"`
	// Suspends the target JVM immediately before the main class is loaded
	DebugSuspend *bool `property:"debug-suspend" json:"debugSuspend,omitempty"`
	// Prints the command used the start the JVM in the container logs (default `true`)
	PrintCommand *bool `property:"print-command" json:"printCommand,omitempty"`
	// Transport address at which to listen for the newly launched JVM (default `*:5005`)
	DebugAddress string `property:"debug-address" json:"debugAddress,omitempty"`
	// A list of JVM options
	Options []string `property:"options" json:"options,omitempty"`
	// Additional JVM classpath (use `Linux` classpath separator)
	Classpath string `property:"classpath" json:"classpath,omitempty"`
}

The JVM trait is used to configure the JVM that runs the integration.

+camel-k:trait=jvm.

func (*JVMTrait) DeepCopy

func (in *JVMTrait) DeepCopy() *JVMTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JVMTrait.

func (*JVMTrait) DeepCopyInto

func (in *JVMTrait) DeepCopyInto(out *JVMTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JolokiaTrait

type JolokiaTrait struct {
	Trait `property:",squash" json:",inline"`
	// The PEM encoded CA certification file path, used to verify client certificates,
	// applicable when `protocol` is `https` and `use-ssl-client-authentication` is `true`
	// (default `/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt` for OpenShift).
	CaCert *string `property:"ca-cert" json:"CACert,omitempty"`
	// The principal(s) which must be given in a client certificate to allow access to the Jolokia endpoint,
	// applicable when `protocol` is `https` and `use-ssl-client-authentication` is `true`
	// (default `clientPrincipal=cn=system:master-proxy`, `cn=hawtio-online.hawtio.svc` and `cn=fuse-console.fuse.svc` for OpenShift).
	ClientPrincipal []string `property:"client-principal" json:"clientPrincipal,omitempty"`
	// Listen for multicast requests (default `false`)
	DiscoveryEnabled *bool `property:"discovery-enabled" json:"discoveryEnabled,omitempty"`
	// Mandate the client certificate contains a client flag in the extended key usage section,
	// applicable when `protocol` is `https` and `use-ssl-client-authentication` is `true`
	// (default `true` for OpenShift).
	ExtendedClientCheck *bool `property:"extended-client-check" json:"extendedClientCheck,omitempty"`
	// The Host address to which the Jolokia agent should bind to. If `"\*"` or `"0.0.0.0"` is given,
	// the servers binds to every network interface (default `"*"`).
	Host *string `property:"host" json:"host,omitempty"`
	// The password used for authentication, applicable when the `user` option is set.
	Password *string `property:"password" json:"password,omitempty"`
	// The Jolokia endpoint port (default `8778`).
	Port int `property:"port" json:"port,omitempty"`
	// The protocol to use, either `http` or `https` (default `https` for OpenShift)
	Protocol *string `property:"protocol" json:"protocol,omitempty"`
	// The user to be used for authentication
	User *string `property:"user" json:"user,omitempty"`
	// Whether client certificates should be used for authentication (default `true` for OpenShift).
	UseSslClientAuthentication *bool `property:"use-ssl-client-authentication" json:"useSSLClientAuthentication,omitempty"`
	// A list of additional Jolokia options as defined
	// in https://jolokia.org/reference/html/agents.html#agent-jvm-config[JVM agent configuration options]
	Options []string `property:"options" json:"options,omitempty"`
}

The Jolokia trait activates and configures the Jolokia Java agent.

See https://jolokia.org/reference/html/agents.html

+camel-k:trait=jolokia nolint: tagliatelle

func (*JolokiaTrait) DeepCopy

func (in *JolokiaTrait) DeepCopy() *JolokiaTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JolokiaTrait.

func (*JolokiaTrait) DeepCopyInto

func (in *JolokiaTrait) DeepCopyInto(out *JolokiaTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KameletsTrait

type KameletsTrait struct {
	Trait `property:",squash" json:",inline"`
	// Automatically inject all referenced Kamelets and their default configuration (enabled by default)
	Auto *bool `property:"auto" json:"auto,omitempty"`
	// Comma separated list of Kamelet names to load into the current integration
	List string `property:"list" json:"list,omitempty"`
	// The directory where the application mounts and reads Kamelet spec (default `/etc/camel/kamelets`)
	MountPoint string `property:"mount-point" json:"mountPoint,omitempty"`
}

The kamelets trait is a platform trait used to inject Kamelets into the integration runtime.

+camel-k:trait=kamelets.

func (*KameletsTrait) DeepCopy

func (in *KameletsTrait) DeepCopy() *KameletsTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KameletsTrait.

func (*KameletsTrait) DeepCopyInto

func (in *KameletsTrait) DeepCopyInto(out *KameletsTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KnativeServiceTrait

type KnativeServiceTrait struct {
	Trait `property:",squash" json:",inline"`
	// The annotations added to route.
	// This can be used to set knative service specific annotations
	// CLI usage example: -t "knative-service.annotations.'haproxy.router.openshift.io/balance'=true"
	Annotations map[string]string `property:"annotations" json:"annotations,omitempty"`
	// Configures the Knative autoscaling class property (e.g. to set `hpa.autoscaling.knative.dev` or `kpa.autoscaling.knative.dev` autoscaling).
	//
	// Refer to the Knative documentation for more information.
	// +kubebuilder:validation:Enum=kpa.autoscaling.knative.dev;hpa.autoscaling.knative.dev
	Class string `property:"autoscaling-class" json:"class,omitempty"`
	// Configures the Knative autoscaling metric property (e.g. to set `concurrency` based or `cpu` based autoscaling).
	//
	// Refer to the Knative documentation for more information.
	Metric string `property:"autoscaling-metric" json:"autoscalingMetric,omitempty"`
	// Sets the allowed concurrency level or CPU percentage (depending on the autoscaling metric) for each Pod.
	//
	// Refer to the Knative documentation for more information.
	Target *int `property:"autoscaling-target" json:"autoscalingTarget,omitempty"`
	// The minimum number of Pods that should be running at any time for the integration. It's **zero** by default, meaning that
	// the integration is scaled down to zero when not used for a configured amount of time.
	//
	// Refer to the Knative documentation for more information.
	MinScale *int `property:"min-scale" json:"minScale,omitempty"`
	// An upper bound for the number of Pods that can be running in parallel for the integration.
	// Knative has its own cap value that depends on the installation.
	//
	// Refer to the Knative documentation for more information.
	MaxScale *int `property:"max-scale" json:"maxScale,omitempty"`
	// Enables to gradually shift traffic to the latest Revision and sets the rollout duration.
	// It's disabled by default and must be expressed as a Golang `time.Duration` string representation,
	// rounded to a second precision.
	RolloutDuration string `property:"rollout-duration" json:"rolloutDuration,omitempty"`
	// Setting `cluster-local`, Knative service becomes a private service.
	// Specifically, this option applies the `networking.knative.dev/visibility` label to Knative service.
	//
	// Refer to the Knative documentation for more information.
	// +kubebuilder:validation:Enum=cluster-local
	Visibility string `property:"visibility" json:"visibility,omitempty"`
	// Automatically deploy the integration as Knative service when all conditions hold:
	//
	// * Integration is using the Knative profile
	// * All routes are either starting from an HTTP based consumer or a passive consumer (e.g. `direct` is a passive consumer)
	Auto *bool `property:"auto" json:"auto,omitempty"`
}

The Knative Service trait allows configuring options when running the Integration as a Knative service, instead of a standard Kubernetes Deployment.

Running an Integration as a Knative Service enables auto-scaling (and scaling-to-zero), but those features are only relevant when the Camel route(s) use(s) an HTTP endpoint consumer.

+camel-k:trait=knative-service.

func (*KnativeServiceTrait) DeepCopy

func (in *KnativeServiceTrait) DeepCopy() *KnativeServiceTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnativeServiceTrait.

func (*KnativeServiceTrait) DeepCopyInto

func (in *KnativeServiceTrait) DeepCopyInto(out *KnativeServiceTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KnativeTrait

type KnativeTrait struct {
	Trait `property:",squash" json:",inline"`
	// Can be used to inject a Knative complete configuration in JSON format.
	Configuration string `property:"configuration" json:"config,omitempty"`
	// List of channels used as source of integration routes.
	// Can contain simple channel names or full Camel URIs.
	ChannelSources []string `property:"channel-sources" json:"channelSources,omitempty"`
	// List of channels used as destination of integration routes.
	// Can contain simple channel names or full Camel URIs.
	ChannelSinks []string `property:"channel-sinks" json:"channelSinks,omitempty"`
	// List of channels used as source of integration routes.
	EndpointSources []string `property:"endpoint-sources" json:"endpointSources,omitempty"`
	// List of endpoints used as destination of integration routes.
	// Can contain simple endpoint names or full Camel URIs.
	EndpointSinks []string `property:"endpoint-sinks" json:"endpointSinks,omitempty"`
	// List of event types that the integration will be subscribed to.
	// Can contain simple event types or full Camel URIs (to use a specific broker different from "default").
	EventSources []string `property:"event-sources" json:"eventSources,omitempty"`
	// List of event types that the integration will produce.
	// Can contain simple event types or full Camel URIs (to use a specific broker).
	EventSinks []string `property:"event-sinks" json:"eventSinks,omitempty"`
	// Enables filtering on events based on the header "ce-knativehistory". Since this header has been removed in newer versions of
	// Knative, filtering is disabled by default.
	FilterSourceChannels *bool `property:"filter-source-channels" json:"filterSourceChannels,omitempty"`
	// Allows binding the integration to a sink via a Knative SinkBinding resource.
	// This can be used when the integration targets a single sink.
	// It's enabled by default when the integration targets a single sink
	// (except when the integration is owned by a Knative source).
	SinkBinding *bool `property:"sink-binding" json:"sinkBinding,omitempty"`
	// Enable automatic discovery of all trait properties.
	Auto *bool `property:"auto" json:"auto,omitempty"`
	// Enables the camel-k-operator to set the "bindings.knative.dev/include=true" label to the namespace
	// As Knative requires this label to perform injection of K_SINK URL into the service.
	// If this is false, the integration pod may start and fail, read the SinkBinding Knative documentation. (default: true)
	NamespaceLabel *bool `property:"namespace-label" json:"namespaceLabel,omitempty"`
}

The Knative trait automatically discovers addresses of Knative resources and inject them into the running integration.

The full Knative configuration is injected in the CAMEL_KNATIVE_CONFIGURATION in JSON format. The Camel Knative component will then use the full configuration to configure the routes.

The trait is enabled by default when the Knative profile is active.

+camel-k:trait=knative.

func (*KnativeTrait) DeepCopy

func (in *KnativeTrait) DeepCopy() *KnativeTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnativeTrait.

func (*KnativeTrait) DeepCopyInto

func (in *KnativeTrait) DeepCopyInto(out *KnativeTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoggingTrait

type LoggingTrait struct {
	Trait `property:",squash" json:",inline"`
	// Colorize the log output
	Color *bool `property:"color" json:"color,omitempty"`
	// Logs message format
	Format string `property:"format" json:"format,omitempty"`
	// Adjust the logging level (defaults to INFO)
	// +kubebuilder:validation:Enum=FATAL;WARN;INFO;DEBUG;TRACE
	Level string `property:"level" json:"level,omitempty"`
	// Output the logs in JSON
	JSON *bool `property:"json" json:"json,omitempty"`
	// Enable "pretty printing" of the JSON logs
	JSONPrettyPrint *bool `property:"json-pretty-print" json:"jsonPrettyPrint,omitempty"`
}

The Logging trait is used to configure Integration runtime logging options (such as color and format). The logging backend is provided by Quarkus, whose configuration is documented at https://quarkus.io/guides/logging.

+camel-k:trait=logging.

func (*LoggingTrait) DeepCopy

func (in *LoggingTrait) DeepCopy() *LoggingTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingTrait.

func (*LoggingTrait) DeepCopyInto

func (in *LoggingTrait) DeepCopyInto(out *LoggingTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MountTrait

type MountTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// A list of configuration pointing to configmap/secret.
	// The configuration are expected to be UTF-8 resources as they are processed by runtime Camel Context and tried to be parsed as property files.
	// They are also made available on the classpath in order to ease their usage directly from the Route.
	// Syntax: [configmap|secret]:name[/key], where name represents the resource name and key optionally represents the resource key to be filtered
	Configs []string `property:"configs" json:"configs,omitempty"`
	// A list of resources (text or binary content) pointing to configmap/secret.
	// The resources are expected to be any resource type (text or binary content).
	// The destination path can be either a default location or any path specified by the user.
	// Syntax: [configmap|secret]:name[/key][@path], where name represents the resource name, key optionally represents the resource key to be filtered and path represents the destination path
	Resources []string `property:"resources" json:"resources,omitempty"`
	// A list of Persistent Volume Claims to be mounted. Syntax: [pvcname:/container/path]
	Volumes []string `property:"volumes" json:"volumes,omitempty"`
	// Enable "hot reload" when a secret/configmap mounted is edited (default false)
	HotReload *bool `property:"hot-reload" json:"hotReload,omitempty"`
}

The Mount trait can be used to configure volumes mounted on the Integration Pods.

+camel-k:trait=mount nolint: tagliatelle

func (*MountTrait) DeepCopy

func (in *MountTrait) DeepCopy() *MountTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MountTrait.

func (*MountTrait) DeepCopyInto

func (in *MountTrait) DeepCopyInto(out *MountTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OpenAPITrait

type OpenAPITrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// The configmaps holding the spec of the OpenAPI
	Configmaps []string `property:"configmaps" json:"configmaps,omitempty"`
}

The OpenAPI DSL trait is internally used to allow creating integrations from a OpenAPI specs.

+camel-k:trait=openapi.

func (*OpenAPITrait) DeepCopy

func (in *OpenAPITrait) DeepCopy() *OpenAPITrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenAPITrait.

func (*OpenAPITrait) DeepCopyInto

func (in *OpenAPITrait) DeepCopyInto(out *OpenAPITrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OwnerTrait

type OwnerTrait struct {
	Trait `property:",squash" json:",inline"`
	// The set of annotations to be transferred
	TargetAnnotations []string `property:"target-annotations" json:"targetAnnotations,omitempty"`
	// The set of labels to be transferred
	TargetLabels []string `property:"target-labels" json:"targetLabels,omitempty"`
}

The Owner trait ensures that all created resources belong to the integration being created and transfers annotations and labels on the integration onto these owned resources.

+camel-k:trait=owner.

func (*OwnerTrait) DeepCopy

func (in *OwnerTrait) DeepCopy() *OwnerTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OwnerTrait.

func (*OwnerTrait) DeepCopyInto

func (in *OwnerTrait) DeepCopyInto(out *OwnerTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PDBTrait

type PDBTrait struct {
	Trait `property:",squash" json:",inline"`
	// The number of pods for the Integration that must still be available after an eviction.
	// It can be either an absolute number or a percentage.
	// Only one of `min-available` and `max-unavailable` can be specified.
	MinAvailable string `property:"min-available" json:"minAvailable,omitempty"`
	// The number of pods for the Integration that can be unavailable after an eviction.
	// It can be either an absolute number or a percentage (default `1` if `min-available` is also not set).
	// Only one of `max-unavailable` and `min-available` can be specified.
	MaxUnavailable string `property:"max-unavailable" json:"maxUnavailable,omitempty"`
}

The PDB trait allows to configure the PodDisruptionBudget resource for the Integration pods.

+camel-k:trait=pdb.

func (*PDBTrait) DeepCopy

func (in *PDBTrait) DeepCopy() *PDBTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PDBTrait.

func (*PDBTrait) DeepCopyInto

func (in *PDBTrait) DeepCopyInto(out *PDBTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PlatformBaseTrait added in v2.1.0

type PlatformBaseTrait struct {
	// Deprecated: no longer in use.
	Enabled *bool `property:"enabled" json:"enabled,omitempty"`
	// Legacy trait configuration parameters.
	// Deprecated: for backward compatibility.
	Configuration *Configuration `json:"configuration,omitempty"`
}

PlatformBaseTrait is the base type for platform traits. It cannot be disabled by the user.

func (*PlatformBaseTrait) DeepCopy added in v2.1.0

func (in *PlatformBaseTrait) DeepCopy() *PlatformBaseTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlatformBaseTrait.

func (*PlatformBaseTrait) DeepCopyInto added in v2.1.0

func (in *PlatformBaseTrait) DeepCopyInto(out *PlatformBaseTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PlatformTrait

type PlatformTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// To create a default (empty) platform when the platform is missing.
	CreateDefault *bool `property:"create-default" json:"createDefault,omitempty"`
	// Indicates if the platform should be created globally in the case of global operator (default true).
	Global *bool `property:"global" json:"global,omitempty"`
	// To automatically detect from the environment if a default platform can be created (it will be created on OpenShift only).
	Auto *bool `property:"auto" json:"auto,omitempty"`
}

The platform trait is a base trait that is used to assign an integration platform to an integration.

In case the platform is missing, the trait is allowed to create a default platform. This feature is especially useful in contexts where there's no need to provide a custom configuration for the platform (e.g. on OpenShift the default settings work, since there's an embedded container image registry).

+camel-k:trait=platform.

func (*PlatformTrait) DeepCopy

func (in *PlatformTrait) DeepCopy() *PlatformTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlatformTrait.

func (*PlatformTrait) DeepCopyInto

func (in *PlatformTrait) DeepCopyInto(out *PlatformTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodTrait

type PodTrait struct {
	Trait `property:",squash" json:",inline"`
}

The pod trait allows the customization of the Integration pods. It applies the `PodSpecTemplate` struct contained in the Integration `.spec.podTemplate` field, into the Integration deployment Pods template, using strategic merge patch.

This can be used to customize the container where Camel routes execute, by using the `integration` container name.

+camel-k:trait=pod.

func (*PodTrait) DeepCopy

func (in *PodTrait) DeepCopy() *PodTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodTrait.

func (*PodTrait) DeepCopyInto

func (in *PodTrait) DeepCopyInto(out *PodTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PrometheusTrait

type PrometheusTrait struct {
	Trait `property:",squash" json:",inline"`
	// Whether a `PodMonitor` resource is created (default `true`).
	PodMonitor *bool `property:"pod-monitor" json:"podMonitor,omitempty"`
	// The `PodMonitor` resource labels, applicable when `pod-monitor` is `true`.
	PodMonitorLabels []string `property:"pod-monitor-labels" json:"podMonitorLabels,omitempty"`
}

The Prometheus trait configures a Prometheus-compatible endpoint. It also creates a `PodMonitor` resource, so that the endpoint can be scraped automatically, when using the Prometheus operator.

The metrics are exposed using Micrometer Metrics.

WARNING: The creation of the `PodMonitor` resource requires the https://github.com/coreos/prometheus-operator[Prometheus Operator] custom resource definition to be installed. You can set `pod-monitor` to `false` for the Prometheus trait to work without the Prometheus Operator.

WARNING: By default the metrics API is not available in JSON

The Prometheus trait is disabled by default.

+camel-k:trait=prometheus.

func (*PrometheusTrait) DeepCopy

func (in *PrometheusTrait) DeepCopy() *PrometheusTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusTrait.

func (*PrometheusTrait) DeepCopyInto

func (in *PrometheusTrait) DeepCopyInto(out *PrometheusTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PullSecretTrait

type PullSecretTrait struct {
	Trait `property:",squash" json:",inline"`
	// The pull secret name to set on the Pod. If left empty this is automatically taken from the `IntegrationPlatform` registry configuration.
	SecretName string `property:"secret-name" json:"secretName,omitempty"`
	// When using a global operator with a shared platform, this enables delegation of the `system:image-puller` cluster role on the operator namespace to the integration service account.
	ImagePullerDelegation *bool `property:"image-puller-delegation" json:"imagePullerDelegation,omitempty"`
	// Automatically configures the platform registry secret on the pod if it is of type `kubernetes.io/dockerconfigjson`.
	Auto *bool `property:"auto" json:"auto,omitempty"`
}

The Pull Secret trait sets a pull secret on the pod, to allow Kubernetes to retrieve the container image from an external registry.

The pull secret can be specified manually or, in case you've configured authentication for an external container registry on the `IntegrationPlatform`, the same secret is used to pull images.

It's enabled by default whenever you configure authentication for an external container registry, so it assumes that external registries are private.

If your registry does not need authentication for pulling images, you can disable this trait.

+camel-k:trait=pull-secret.

func (*PullSecretTrait) DeepCopy

func (in *PullSecretTrait) DeepCopy() *PullSecretTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PullSecretTrait.

func (*PullSecretTrait) DeepCopyInto

func (in *PullSecretTrait) DeepCopyInto(out *PullSecretTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type QuarkusMode added in v2.1.0

type QuarkusMode string

QuarkusMode is the type of Quarkus build packaging. +kubebuilder:validation:Enum=jvm;native

const (
	// JvmQuarkusMode represents "JVM mode" Quarkus execution.
	JvmQuarkusMode QuarkusMode = "jvm"
	// NativeQuarkusMode represents "Native mode" Quarkus execution.
	NativeQuarkusMode QuarkusMode = "native"
)

type QuarkusPackageType

type QuarkusPackageType string

QuarkusPackageType is the type of Quarkus build packaging. Deprecated: use `QuarkusMode` instead. +kubebuilder:validation:Enum=fast-jar;native

const (
	// FastJarPackageType represents "fast jar" Quarkus packaging.
	FastJarPackageType QuarkusPackageType = "fast-jar"
	// NativePackageType represents "native" Quarkus packaging.
	NativePackageType QuarkusPackageType = "native"
)

type QuarkusTrait

type QuarkusTrait struct {
	PlatformBaseTrait `property:",squash" json:",inline"`
	// The Quarkus package types, `fast-jar` or `native` (default `fast-jar`).
	// In case both `fast-jar` and `native` are specified, two `IntegrationKit` resources are created,
	// with the native kit having precedence over the `fast-jar` one once ready.
	// The order influences the resolution of the current kit for the integration.
	// The kit corresponding to the first package type will be assigned to the
	// integration in case no existing kit that matches the integration exists.
	// Deprecated: use `build-mode` instead.
	PackageTypes []QuarkusPackageType `property:"package-type" json:"packageTypes,omitempty"`
	// The Quarkus mode to run: either `jvm` or `native` (default `jvm`).
	// In case both `jvm` and `native` are specified, two `IntegrationKit` resources are created,
	// with the `native` kit having precedence over the `jvm` one once ready.
	Modes []QuarkusMode `property:"build-mode" json:"buildMode,omitempty"`
	// The base image to use when running a native build (default `quay.io/quarkus/quarkus-micro-image:2.0`)
	NativeBaseImage string `property:"native-base-image" json:"nativeBaseImage,omitempty"`
	// The image containing the tooling required for a native build (by default it will use the one provided in the runtime catalog)
	NativeBuilderImage string `property:"native-builder-image" json:"nativeBuilderImage,omitempty"`
}

The Quarkus trait configures the Quarkus runtime.

It's enabled by default.

NOTE: A native based compilation will be forced to use a `pod` build strategy. Compiling to a native executable, i.e. when using `build-mode=native`, requires at least 4GiB of memory, so the Pod running the native build, must have enough memory available.

+camel-k:trait=quarkus.

func (*QuarkusTrait) DeepCopy

func (in *QuarkusTrait) DeepCopy() *QuarkusTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuarkusTrait.

func (*QuarkusTrait) DeepCopyInto

func (in *QuarkusTrait) DeepCopyInto(out *QuarkusTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RawMessage

type RawMessage []byte

RawMessage defines a binary type for configuration +kubebuilder:validation:Type=object +kubebuilder:validation:Format="" +kubebuilder:pruning:PreserveUnknownFields Deprecated: for backward compatibility.

func (RawMessage) DeepCopy

func (in RawMessage) DeepCopy() RawMessage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawMessage.

func (RawMessage) DeepCopyInto

func (in RawMessage) DeepCopyInto(out *RawMessage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (RawMessage) MarshalJSON

func (m RawMessage) MarshalJSON() ([]byte, error)

MarshalJSON returns m as the JSON encoding of m.

func (*RawMessage) UnmarshalJSON

func (m *RawMessage) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *m to a copy of data.

type RegistryTrait

type RegistryTrait struct {
	Trait `property:",squash" json:",inline"`
}

The Registry trait sets up Maven to use the Image registry as a Maven repository.

+camel-k:trait=registry.

func (*RegistryTrait) DeepCopy

func (in *RegistryTrait) DeepCopy() *RegistryTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryTrait.

func (*RegistryTrait) DeepCopyInto

func (in *RegistryTrait) DeepCopyInto(out *RegistryTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RouteTrait

type RouteTrait struct {
	Trait `property:",squash" json:",inline"`
	// The annotations added to route.
	// This can be used to set route specific annotations
	// For annotations options see https://docs.openshift.com/container-platform/3.11/architecture/networking/routes.html#route-specific-annotations
	// CLI usage example: -t "route.annotations.'haproxy.router.openshift.io/balance'=true"
	Annotations map[string]string `property:"annotations" json:"annotations,omitempty"`
	// To configure the host exposed by the route.
	Host string `property:"host" json:"host,omitempty"`
	// The TLS termination type, like `edge`, `passthrough` or `reencrypt`.
	//
	// Refer to the OpenShift route documentation for additional information.
	// +kubebuilder:validation:Enum=edge;reencrypt;passthrough
	TLSTermination string `property:"tls-termination" json:"tlsTermination,omitempty"`
	// The TLS certificate contents.
	//
	// Refer to the OpenShift route documentation for additional information.
	TLSCertificate string `property:"tls-certificate" json:"tlsCertificate,omitempty"`
	// The secret name and key reference to the TLS certificate. The format is "secret-name[/key-name]", the value represents the secret name, if there is only one key in the secret it will be read, otherwise you can set a key name separated with a "/".
	//
	// Refer to the OpenShift route documentation for additional information.
	TLSCertificateSecret string `property:"tls-certificate-secret" json:"tlsCertificateSecret,omitempty"`
	// The TLS certificate key contents.
	//
	// Refer to the OpenShift route documentation for additional information.
	TLSKey string `property:"tls-key" json:"tlsKey,omitempty"`
	// The secret name and key reference to the TLS certificate key. The format is "secret-name[/key-name]", the value represents the secret name, if there is only one key in the secret it will be read, otherwise you can set a key name separated with a "/".
	//
	// Refer to the OpenShift route documentation for additional information.
	TLSKeySecret string `property:"tls-key-secret" json:"tlsKeySecret,omitempty"`
	// The TLS CA certificate contents.
	//
	// Refer to the OpenShift route documentation for additional information.
	TLSCACertificate string `property:"tls-ca-certificate" json:"tlsCACertificate,omitempty"`
	// The secret name and key reference to the TLS CA certificate. The format is "secret-name[/key-name]", the value represents the secret name, if there is only one key in the secret it will be read, otherwise you can set a key name separated with a "/".
	//
	// Refer to the OpenShift route documentation for additional information.
	TLSCACertificateSecret string `property:"tls-ca-certificate-secret" json:"tlsCACertificateSecret,omitempty"`
	// The destination CA certificate provides the contents of the ca certificate of the final destination.  When using reencrypt
	// termination this file should be provided in order to have routers use it for health checks on the secure connection.
	// If this field is not specified, the router may provide its own destination CA and perform hostname validation using
	// the short service name (service.namespace.svc), which allows infrastructure generated certificates to automatically
	// verify.
	//
	// Refer to the OpenShift route documentation for additional information.
	TLSDestinationCACertificate string `property:"tls-destination-ca-certificate" json:"tlsDestinationCACertificate,omitempty"`
	// The secret name and key reference to the destination CA certificate. The format is "secret-name[/key-name]", the value represents the secret name, if there is only one key in the secret it will be read, otherwise you can set a key name separated with a "/".
	//
	// Refer to the OpenShift route documentation for additional information.
	TLSDestinationCACertificateSecret string `property:"tls-destination-ca-certificate-secret" json:"tlsDestinationCACertificateSecret,omitempty"`
	// To configure how to deal with insecure traffic, e.g. `Allow`, `Disable` or `Redirect` traffic.
	//
	// Refer to the OpenShift route documentation for additional information.
	// +kubebuilder:validation:Enum=None;Allow;Redirect
	TLSInsecureEdgeTerminationPolicy string `property:"tls-insecure-edge-termination-policy" json:"tlsInsecureEdgeTerminationPolicy,omitempty"`
}

The Route trait can be used to configure the creation of OpenShift routes for the integration.

The certificate and key contents may be sourced either from the local filesystem or in a OpenShift `secret` object. The user may use the parameters ending in `-secret` (example: `tls-certificate-secret`) to reference a certificate stored in a `secret`. Parameters ending in `-secret` have higher priorities and in case the same route parameter is set, for example: `tls-key-secret` and `tls-key`, then `tls-key-secret` is used. The recommended approach to set the key and certificates is to use `secrets` to store their contents and use the following parameters to reference them: `tls-certificate-secret`, `tls-key-secret`, `tls-ca-certificate-secret`, `tls-destination-ca-certificate-secret` See the examples section at the end of this page to see the setup options.

+camel-k:trait=route nolint: tagliatelle

func (*RouteTrait) DeepCopy

func (in *RouteTrait) DeepCopy() *RouteTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteTrait.

func (*RouteTrait) DeepCopyInto

func (in *RouteTrait) DeepCopyInto(out *RouteTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceBindingTrait

type ServiceBindingTrait struct {
	Trait `property:",squash" json:",inline"`
	// List of Services in the form [[apigroup/]version:]kind:[namespace/]name
	Services []string `property:"services" json:"services,omitempty"`
}

The Service Binding trait allows users to connect to Services in Kubernetes: https://github.com/k8s-service-bindings/spec#service-binding As the specification is still evolving this is subject to change.

+camel-k:trait=service-binding.

func (*ServiceBindingTrait) DeepCopy

func (in *ServiceBindingTrait) DeepCopy() *ServiceBindingTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceBindingTrait.

func (*ServiceBindingTrait) DeepCopyInto

func (in *ServiceBindingTrait) DeepCopyInto(out *ServiceBindingTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceTrait

type ServiceTrait struct {
	Trait `property:",squash" json:",inline"`
	// To automatically detect from the code if a Service needs to be created.
	Auto *bool `property:"auto" json:"auto,omitempty"`
	// Enable Service to be exposed as NodePort (default `false`).
	// Deprecated: Use service type instead.
	NodePort *bool `property:"node-port" json:"nodePort,omitempty"`
	// The type of service to be used, either 'ClusterIP', 'NodePort' or 'LoadBalancer'.
	// +kubebuilder:validation:Enum=ClusterIP;NodePort;LoadBalancer
	Type *ServiceType `property:"type" json:"type,omitempty"`
}

The Service trait exposes the integration with a Service resource so that it can be accessed by other applications (or integrations) in the same namespace.

It's enabled by default if the integration depends on a Camel component that can expose a HTTP endpoint.

+camel-k:trait=service.

func (*ServiceTrait) DeepCopy

func (in *ServiceTrait) DeepCopy() *ServiceTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceTrait.

func (*ServiceTrait) DeepCopyInto

func (in *ServiceTrait) DeepCopyInto(out *ServiceTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServiceType

type ServiceType string
const (
	// ServiceTypeClusterIP means a service will only be accessible inside the
	// cluster, via the cluster IP.
	ServiceTypeClusterIP ServiceType = "ClusterIP"

	// ServiceTypeNodePort means a service will be exposed on one port of
	// every node, in addition to 'ClusterIP' type.
	ServiceTypeNodePort ServiceType = "NodePort"

	// ServiceTypeLoadBalancer means a service will be exposed via an
	// external load balancer (if the cloud provider supports it), in addition
	// to 'NodePort' type.
	ServiceTypeLoadBalancer ServiceType = "LoadBalancer"
)

type TolerationTrait

type TolerationTrait struct {
	Trait `property:",squash" json:",inline"`
	// The list of taints to tolerate, in the form `Key[=Value]:Effect[:Seconds]`
	Taints []string `property:"taints" json:"taints,omitempty"`
}

This trait sets Tolerations over Integration pods. Tolerations allow (but do not require) the pods to schedule onto nodes with matching taints. See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ for more details.

The toleration should be expressed in a similar manner that of taints, i.e., `Key[=Value]:Effect[:Seconds]`, where values in square brackets are optional.

For examples:

- `node-role.kubernetes.io/master:NoSchedule` - `node.kubernetes.io/network-unavailable:NoExecute:3000` - `disktype=ssd:PreferNoSchedule`

It's disabled by default.

+camel-k:trait=toleration.

func (*TolerationTrait) DeepCopy

func (in *TolerationTrait) DeepCopy() *TolerationTrait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TolerationTrait.

func (*TolerationTrait) DeepCopyInto

func (in *TolerationTrait) DeepCopyInto(out *TolerationTrait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Trait

type Trait struct {
	// Can be used to enable or disable a trait. All traits share this common property.
	Enabled *bool `property:"enabled" json:"enabled,omitempty"`

	// Legacy trait configuration parameters.
	// Deprecated: for backward compatibility.
	Configuration *Configuration `json:"configuration,omitempty"`
}

Trait is the base type for all traits. It could be disabled by the user.

func (*Trait) DeepCopy

func (in *Trait) DeepCopy() *Trait

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trait.

func (*Trait) DeepCopyInto

func (in *Trait) DeepCopyInto(out *Trait)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL