Kaoto backend documentation

This is an automated documentation generated based on comments in the code.

There is also a static swagger API documentation available.

Simplified Class Hierarchy

(click to enlarge)

๐Ÿ”—CapabilitiesResource

This endpoint will return information about what are the capabilities of the backend API of Kaoto.

For example, the supported DSLs.

๐Ÿ”—Methods

Method Returns Description
getAll() Capabilities Returns information of all the supported capabilities.

๐Ÿ”—

๐Ÿ”—Capabilities

Property Type Description
dsls Map Returns the list of available languages and the capabilities they have.

๐Ÿ”—

๐Ÿ”—LanguageService

Service to extract languages from all supported DSL. This is the utility class the resource relies on to perform the operations.
Method Returns Description
getAll() Map Returns the supported languages.

๐Ÿ”—DeploymentsResource

This endpoint will interact with the cluster starting, stopping, and listing running resources.

๐Ÿ”—Methods

Method Returns Description
all(<String> namespace) String Returns the list of all resources
start(<String> crd, <String> namespace, <String> name) String Deploys a CRD provided.
get(<String> name, <String> type, <String> namespace) String Returns the CRD of the running resource, if exists.
stop(<String> name, <String> type, <String> namespace) String Stops and deletes a running resource by name
logs(<String> name, <String> namespace) String Returns a stream of the log

๐Ÿ”—

<p> <p>

๐Ÿ”—ClusterService

Service to interact with the cluster. This is the utility class the resource relies on to perform the

operations.
Method Returns Description
getResources(<String> namespace) Deployment[] Returns the list of resources in a given namespace
start(<String> namespace, <String> input, <CustomResource> binding) Deploys the given input resource

Starts the given CustomResource.

stop(<String> namespace, <String> name) Stops the resource with the given name.
get(<String> namespace, <String> name) CustomResource Returns the given resource.
streamlogs(<String> namespace, <String> name, <Integer> lines) String Streams the log of the given pod, starting with said number of lines.

๐Ÿ”—IntegrationsResource

This endpoint will return the yaml needed to deploy the related integration and the endpoints to interact with deployments. <p> This endpoint will return the yaml needed to deploy the related integration and the endpoints to interact with deployments.

๐Ÿ”—Methods

Method Returns Description
crd(<String> dsl, <Integration> integration) Map Idempotent operation that given given a JSON status, returns the CRD.
integration(<String> dsl, <String> crd) Map Idempotent operation that given a CRD, returns the JSON status.

Idempotent operation that given a CRD, returns the JSON representation.

compatibleDSL(<List[Step]> steps) Map Idempotent operation that given list of steps, returns the list of compatible languages.
CRDs(<String> dsl, <List> integration) Map Idempotent operation that given an array of integrations, returns the corresponding CRDs.

๐Ÿ”—

Represents an Integration definition that can be deployed.

This generates a flow based on how Camel-K defines YAML routes as described in https://camel.apache.org/components/latest/others/yaml-dsl.html This implementation models the steps as "Loading Camel K Integrations".

๐Ÿ”—Integration

Property Type Description
steps Step[] Workflow of steps that define this resource.
metadata Map Metadata associated to this resource.
parameters Parameter[] Input parameters associated to this resource.
dsl String Language to use with this resource.

๐Ÿ”—

๐Ÿ”—DeploymentService

Service to interact with the cluster. This is the utility class the resource relies on to perform the operations.
Method Returns Description
integration(<String> name, <List[Step]> stepArray) Map Based on the provided steps, returns a valid CRDs to deploy
crd(<Integration> i, <String> dsl) String Based on the provided steps, return a valid yaml string to deploy
crds(<List> integrationList, <String> dsl) String Based on the provided steps, return a valid yaml string to deploy

๐Ÿ”—StepResource

<p> This endpoint will return steps based on the parameters.

๐Ÿ”—Methods

Method Returns Description
allSteps(<String> type, <String> dsl, <String> kind) List[Step] Returns all the steps. If parameters are included in the query, it will filter only those steps compatible with the constraints.
stepById(<String> id) Step Returns the first step identified by the parameter.
stepsByName(<String> name) List[Step] Returns all the steps identified by the name.

๐Ÿ”—

๐Ÿ”—StepService

Service to interact with steps. This is the utility class the resource relies on to perform the operations.
Method Returns Description
stepById(<String> id) Step Returns the first step identified by the parameter.
stepsByName(<String> name) List[Step] Returns all the steps identified by the name.
allSteps() List[Step] Returns all the steps.

๐Ÿ”—

<p>

๐Ÿ”—DeploymentGeneratorService

Generic interface to generate deployments
Method Returns Description
parse(<List[Step]> steps, <List[Parameter]> parameters, <Map> metadata, <ParseResult> flows, <String> input) String Based on the list of steps, returns the yaml to deploy it. If applies, the name will be the name used on the integration deployed.

Based on the list of flows, returns the source code. If applies, the name will be the name used on the integration deployed.

Based on the source code, returns the resource to deploy.

getStatus() CustomResource Returns the status of the custom resource provided. It must be one of the supported types in #supportedCustomResources() .
supportedCustomResources() List Returns the Java model classes that extend CustomResource and that are the types of custom resources supported in the cluster.
getResources(<String> namespace, <KubernetesClient> kclient) Deployment[] Return the step kinds compatible with this service.
getPod(<String> namespace, <String> name, <KubernetesClient> kclient) Pod Return the pod associated to the resource by name. If no pod associated, returns null.
filterCatalog(<String> previousStep, <String> followingStep) List[Step] Filters a list of steps. previousStep and followingStep gives context to the catalog, potentially restricting the response.

๐Ÿ”—ViewDefinitionResource

This endpoint will return a list of views based on the parameters.

๐Ÿ”—Methods

Method Returns Description
viewsPerStepList:(<Step[]> DeploymentResourceYamlRequest) Based on the list of steps provided, offer a list of possible view definitions and step extensions.

๐Ÿ”—

๐Ÿ”—ViewDefinitionService

Service to interact with view definitions. This is the utility class the resource relies on to perform the operations.
Method Returns Description
viewsPerStepList(<Step[]> steps) List[ViewDefinition] Based on the provided list of steps, offer a list of compatible ViewDefinitions.

๐Ÿ”—Kamelet

Represents a Kamelet definition that can be deployed.

This generates a flow based on how Camel-K defines YAML routes as described in https://camel.apache.org/camel-k/1.6.x/languages/yaml.html This implementation models the steps as "Using URI and parameters".

๐Ÿ”—KameletBinding

Represents a Kamelet binding that can be deployed <p> <p>

apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: twitter-search-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: twitter-search-source
properties:
keywords: "Apache Camel"
apiKey: "your own"
apiKeySecret: "your own"
accessToken: "your own"
accessTokenSecret: "your own"
steps:
-
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: aws-translate-action
-
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: avro-deserialize-action
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: kafka-sink
properties:
brokers: "The Brokers"
password: "The Password"
topic: "The Topic Names"
username: "The Username"

๐Ÿ”—CamelRoute

๐Ÿ”—KameletParseCatalog

Reads and parses a kamelet catalog. Extracts all the kamelet definitions it can find and generate a kamelet step for each one.

๐Ÿ”—Methods

Methods inherited from StepCatalogParser
Method Returns Description
getParser(<String> url, <String> tag) ParseCatalog Loads all the elements from memory(code).

Loads all the elements on the given url.

Loads all the elements on the git repository.

getParserFromCluster() ParseCatalog Loads all the elements on the connected cluster.
getLocalFolder(<Path> path) ParseCatalog Loads all the elements on the given path.
generatesKind(<String> kind) Boolean Does this parser generate steps of this kind?

๐Ÿ”—AbstractCatalog

Abstract implementation of an ApplicationScoped catalog. This will be the base of the beans that can be injected in the different services and resources.

๐Ÿ”—Methods

Method Returns Description
waitForWarmUp() CompletableFuture Completable reference to when the loadParsers method finishes.
loadParsers() List[ParseCatalog] Loads all the catalogs into the bean
warmUpCatalog() Add all elements from the parsers into the catalog
refresh() Function to be called periodically that refreshes the elements of the catalog, considering the catalog is dynamic. It prevents any synchronization error that would show an empty catalog during the refreshing.

๐Ÿ”—CatalogCollection

Joins a list of metadata catalogs. When those catalogs are updated, the content of this collection changes too. As each catalog have their own ID constraints, there may be more than one connector with the same ID on this collection of catalogs.

๐Ÿ”—Methods

Methods inherited from MetadataCatalog
Method Returns Description
searchStepByID(<String> id) Metadata Returns the element identified by the parameter.
searchByName(<String> name) List[Metadata] Returns all the elements found (no order warranteed) identified by the name.
store(<List[Step]> steps) boolean Stores the elements passed as parameter on the catalog. Returns true if no error was found.
getAll() List[Metadata] Returns all the elements in the catalog. Be careful using this as there's no limit on the amount of data stored on the catalog.
clear() void Removes all metadata from catalog.

๐Ÿ”—InMemoryCatalog

Basic catalog implementation useful for testing and small instances.

๐Ÿ”—Methods

Methods inherited from MetadataCatalog
Method Returns Description
searchStepByID(<String> id) Metadata Returns the element identified by the parameter.
searchByName(<String> name) List[Metadata] Returns all the elements found (no order warranteed) identified by the name.
store(<List[Step]> steps) boolean Stores the elements passed as parameter on the catalog. Returns true if no error was found.
getAll() List[Metadata] Returns all the elements in the catalog. Be careful using this as there's no limit on the amount of data stored on the catalog.
clear() void Removes all metadata from catalog.

๐Ÿ”—ReadOnlyCatalog

A Catalog Collection that acts as singleton to a catalog collection. It only contains one catalog, and if you add another one, it replaces it. This is useful to avoid empty catalogs when reloading data.

๐Ÿ”—Methods

Methods inherited from MetadataCatalog
Method Returns Description
searchStepByID(<String> id) Metadata Returns the element identified by the parameter.
searchByName(<String> name) List[Metadata] Returns all the elements found (no order warranteed) identified by the name.
store(<List[Step]> steps) boolean Stores the elements passed as parameter on the catalog. Returns true if no error was found.
getAll() List[Metadata] Returns all the elements in the catalog. Be careful using this as there's no limit on the amount of data stored on the catalog.
clear() void Removes all metadata from catalog.

๐Ÿ”—MetadataCatalog

All metadata catalogs implements this interface. Helper to unify catalog handling implementation.

๐Ÿ”—Methods

Method Returns Description
searchStepByID(<String> id) Metadata Returns the element identified by the parameter.
searchByName(<String> name) List[Metadata] Returns all the elements found (no order warranteed) identified by the name.
store(<List[Step]> steps) boolean Stores the elements passed as parameter on the catalog. Returns true if no error was found.
getAll() List[Metadata] Returns all the elements in the catalog. Be careful using this as there's no limit on the amount of data stored on the catalog.
clear() void Removes all metadata from catalog.

๐Ÿ”—

๐Ÿ”—Metadata

Common class for all metadata. Used to simplify the implementation of catalogs.
Property Type Description
ID String Unique identifier for this step in our whole Kaoto environment
name String This represents the first part of the camel connection string. It may or may not be the same as the ID depending on the type of step.
type String Type of step: transformation, connector

๐Ÿ”—ParseCatalog

Load and warm up catalog utility.

๐Ÿ”—Methods

Method Returns Description
parse() CompletableFuture[List[T]] Load all the source data, parse it and return a completable list of elements to add to a catalog.
setFileVisitor(<YamlProcessFile> fileVisitor)

๐Ÿ”—GitParseCatalog

Abstract implementation that downloads a git repository and walks through all the files parsing them and preparing elements to add to a catalog.

๐Ÿ”—Methods

Methods inherited from ParseCatalog
Method Returns Description
parse() CompletableFuture[List[T]] Load all the source data, parse it and return a completable list of elements to add to a catalog.
setFileVisitor(<YamlProcessFile> fileVisitor)

๐Ÿ”—JarParseCatalog

Abstract implementation that downloads a jar file and walks through all the files parsing them and preparing elements to add to a catalog.

๐Ÿ”—Methods

Methods inherited from ParseCatalog
Method Returns Description
parse() CompletableFuture[List[T]] Load all the source data, parse it and return a completable list of elements to add to a catalog.
setFileVisitor(<YamlProcessFile> fileVisitor)

๐Ÿ”—LocalFolderParseCatalog

Abstract implementation that walks through all the files in a local folder parsing them and preparing elements to add to a catalog.

๐Ÿ”—Methods

Methods inherited from ParseCatalog
Method Returns Description
parse() CompletableFuture[List[T]] Load all the source data, parse it and return a completable list of elements to add to a catalog.
setFileVisitor(<YamlProcessFile> fileVisitor)

๐Ÿ”—ClusterParseCatalog

Abstract implementation that extracts CustomResources from a cluster and parses them to add to a catalog.

๐Ÿ”—Methods

Methods inherited from ParseCatalog
Method Returns Description
parse() CompletableFuture[List[T]] Load all the source data, parse it and return a completable list of elements to add to a catalog.
setFileVisitor(<YamlProcessFile> fileVisitor)

๐Ÿ”—YamlProcessFile

๐Ÿ”—ViewDefinition

Represents a possible view the frontend can use to show data and metadata. It may have some constraints on when this view can be used.

๐Ÿ”—Properties

Property Type Description
properties Map[String, String] Properties useful for the user interface to visualize this view definition.
step Step If this extension relates to a specific step (StepExtension), point to it via the UUID of the step in this integration.
url String If this is a custom step, url to fetch the view.
constraints List[ViewDefinitionConstraint] List of constraints on when to use this view. All mandatory constraints must be fulfilled. If there are optional constraints, at least one of them should be fulfilled.
Properties inherited from Metadata
Property Type Description
ID String Unique identifier for this step in our whole Kaoto environment
name String This represents the first part of the camel connection string. It may or may not be the same as the ID depending on the type of step.
type String Type of step: transformation, connector

๐Ÿ”—

๐Ÿ”—ViewDefinitionConstraint

Represents a constraint on when to use a view definition.
Property Type Description
mandatory boolean Is this a mandatory constraint or an optional?
operation ConstraintOperation Operation defining this constraint (contains, greater than,...)
parameter String Parameter of the constraint (number of steps, identifier of step,...)

๐Ÿ”—ViewDefinitionCatalog

This is a singleton that will contain all catalogs with viewdefinitions.

๐Ÿ”—Methods

Methods inherited from AbstractCatalog
Method Returns Description
waitForWarmUp() CompletableFuture Completable reference to when the loadParsers method finishes.
loadParsers() List[ParseCatalog] Loads all the catalogs into the bean
warmUpCatalog() Add all elements from the parsers into the catalog
refresh() Function to be called periodically that refreshes the elements of the catalog, considering the catalog is dynamic. It prevents any synchronization error that would show an empty catalog during the refreshing.

๐Ÿ”—ViewDefinitionParseCatalog

Reads and parses a view definition catalog. Extracts all the view definitions it can find and generate a ViewDefinition for each one.

๐Ÿ”—ViewDefinitionParserService

Generic interface for all viewDefinition parsers.

๐Ÿ”—Methods

Method Returns Description
parse(<List[Step]> steps) List[ViewDefinition] Based on the list of steps, offer a list of compatible ViewDefinitions.
getViewsPerStep(<List[Step]> steps, <ViewDefinition> view) List[ViewDefinition] If the ViewDefinition is a stepView, it returns all possible ViewDefinitions associated to steps.
appliesTo(<List[Step]> steps, <ViewDefinition> viewDefinition) boolean Check if the viewDefinition applies to the steps or one of the given steps by also looking into subsequent branches
appliesToStep(<Step> steps, <ViewDefinition> viewDefinition) boolean Check if the viewDefinition applies to the exact given step but not a step in subsequent branches

๐Ÿ”—

๐Ÿ”—Step

Represents a step inside an integration.

๐Ÿ”—Properties

Property Type Description
description String Human-readable description of what this step does.
title String Human-readable title of this step.
parameters List[Parameter] List of configurable parameters for this step.
icon String Base64 icon image for this step.
UUID String Volatile UUID to mark the relationship between a viewDefinition and a step.
required String[] List of properties that the object must have.
group String Group that identifies and classifies inside the steps world.
kind String Kind of step which usually translates to the kind this step will have on the final CRD for deployment.
branches Branch[] If this is a nested step that contains branches of steps, this is where those branches are defined.
minBranches Integer Minimum amount of branches used on this step. Zero by default.
maxBranches Integer Maximum amount of branches used on this step. Zero by default.
id String User defined id for this step.
Properties inherited from Metadata
Property Type Description
ID String Unique identifier for this step in our whole Kaoto environment
name String This represents the first part of the camel connection string. It may or may not be the same as the ID depending on the type of step.
type String Type of step: transformation, connector

๐Ÿ”—

๐Ÿ”—Branch

Property Type Description
steps List[Step] List of steps this branch has.
parameters Parameter[] List of parameters of the branch.

๐Ÿ”—Parameter

<p> Represents a parameter of a step in an integration. These parameters could be used on the UI to configure the step.

๐Ÿ”—Properties

Property Type Description
description String Helping text describing the parameter
title String Human name for the view
id String Identifier of the parameter
value Object Actual value of this parameter. Used when describing a configured element.
default Object Default value, if there is any
type String Type of parameter: number, integer, string, boolean, array, object, or null
path Boolean Is this a path parameter?
nullable Boolean Can this property be null?
enum Object[] All the possible values for this property.
examples Object[] Examples of valid values.
pathOrder Integer If this parameter is a path parameter, order in which it will appear
pathSeparator String If this parameter is a path parameter, what is the string/character to separate it from the rest

๐Ÿ”—

๐Ÿ”—ArrayParameter

Property Type Description
maxItems Integer Maximum number of items this array can have.
minItems Integer Minimum number of items this array must have.
uniqueItems boolean Indicates if all items must be unique.

๐Ÿ”—

๐Ÿ”—IntegerParameter

Property Type Description
maximum Integer Maximum value for this property.
minimum Integer Minimum value for this property.

๐Ÿ”—

๐Ÿ”—NumberParameter

Property Type Description
maximum Number Maximum value for this property.
minimum Number Minimum value for this property.

๐Ÿ”—

๐Ÿ”—ObjectParameter

Property Type Description
maxProperties Integer Maximum number of properties this object can have.
minProperties Integer Minimum number of properties this object can have.
required String[] List of properties that the object must have.

๐Ÿ”—

๐Ÿ”—StringParameter

Property Type Description
maxLength Integer Maximum size of the string.
minLength Integer Minimum size of the string.
pattern Regex (String) Valid data must match this regular expression.
format String Valid data must match the format with this name. See input types on HTML.

๐Ÿ”—StepCatalog

This is a singleton that will contain all catalogs with steps.

๐Ÿ”—Methods

Methods inherited from AbstractCatalog
Method Returns Description
waitForWarmUp() CompletableFuture Completable reference to when the loadParsers method finishes.
loadParsers() List[ParseCatalog] Loads all the catalogs into the bean
warmUpCatalog() Add all elements from the parsers into the catalog
refresh() Function to be called periodically that refreshes the elements of the catalog, considering the catalog is dynamic. It prevents any synchronization error that would show an empty catalog during the refreshing.

๐Ÿ”—StepCatalogParser

Interface used to parse steps from a remote catalog.

๐Ÿ”—Methods

Method Returns Description
getParser(<String> url, <String> tag) ParseCatalog Loads all the elements from memory(code).

Loads all the elements on the given url.

Loads all the elements on the git repository.

getParserFromCluster() ParseCatalog Loads all the elements on the connected cluster.
getLocalFolder(<Path> path) ParseCatalog Loads all the elements on the given path.
generatesKind(<String> kind) Boolean Does this parser generate steps of this kind?

๐Ÿ”—StepParserService

Generic interface for all step parsers.

๐Ÿ”—Methods

Method Returns Description
parse(<String> yaml) ParseResult Based on the YAML provided, offer a list of steps defined on it and the metadata associated to the orchestration.
getParsedFlows(<String> yaml) List Based on the YAML provided, offer a list of flows defined on it and the metadata associated to the orchestration.
appliesTo(<String> yaml) boolean Check if this parser knows how to parse the provided source code

๐Ÿ”—

๐Ÿ”—

๐Ÿ”—

๐Ÿ”—

๐Ÿ”—

๐Ÿ”—FlowsWrapper

Used by the API to pass flows back and forth.

๐Ÿ”—CamelRestDSLParseCatalog

<p> <p> Adds the REST DSL steps to the catalog.

๐Ÿ”—Methods

Methods inherited from StepCatalogParser
Method Returns Description
getParser(<String> url, <String> tag) ParseCatalog Loads all the elements from memory(code).

Loads all the elements on the given url.

Loads all the elements on the git repository.

getParserFromCluster() ParseCatalog Loads all the elements on the connected cluster.
getLocalFolder(<Path> path) ParseCatalog Loads all the elements on the given path.
generatesKind(<String> kind) Boolean Does this parser generate steps of this kind?

๐Ÿ”—SimplifiedKamelet

Used to read kamelet properties, but not digging into the implementation of the kamelet.

๐Ÿ”—EmptyParseCatalog

This returns an empty catalog.

๐Ÿ”—Methods

Methods inherited from ParseCatalog
Method Returns Description
parse() CompletableFuture[List[T]] Load all the source data, parse it and return a completable list of elements to add to a catalog.
setFileVisitor(<YamlProcessFile> fileVisitor)

๐Ÿ”—ProcessFile

Helper class to walk around files to parse Metadata objects.

๐Ÿ”—DSLSpecification

<p> <p>

๐Ÿ”—Methods

<p> <p> Generic interface to define DSL specific elements like the vocabulary or capabilities.
Method Returns Description
identifier() String Returns the identifier of the supported language.

This must be unique on the whole Kaoto instance and relates the deployments and parsers services with the DSL specification.

description() String Returns the identifier of the supported language.

This must be unique on the whole Kaoto instance and relates the deployments and parsers services with the DSL specification.

isDeployable() boolean Based on the environment, the capabilities, or any other important feature. But, is this DSL deployable using the Deploy button in Kaoto?
getKinds() String[] Return the kinds of steps compatible with this DSL.
appliesTo(<List[Step]> steps, <ParseResult> flows, <String> yaml) boolean Check if this DSL can be applied to the list of steps.

Check if at least one of the flows belongs to this DSL.

Check if the source code is from this DSL.

getDeploymentGeneratorService() DeploymentGeneratorService Returns the Deployment Generator Service associated to this DSL, if exists.
getStepParserService() StepParserService Returns the Step Parser Service associated to this DSL, if exists.