Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. Kamelets reference
4.1. Kamelet structure Link kopierenLink in die Zwischenablage kopiert!
A kamelet is typically coded in the YAML domain-specific language. The file name prefix is the name of the kamelet. For example, a kamelet with the name FTP sink has the filename ftp-sink.kamelet.yaml.
Note that in OpenShift, a kamelet is a resource that shows the name of the kamelet (not the filename).
At a high level, a kamelet resource describes:
-
A metadata section containing the ID of the kamelet and other information, such as the type of kamelet (
source,sink, oraction). - A definition (JSON-schema specification) that contains a set of parameters that you can use to configure the kamelet.
-
An optional
typessection containing information about input and output expected by the kamelet. - A Camel flow in YAML DSL that defines the implementation of the kamelet.
The following diagram shows an example of a kamelet and its parts.
Example kamelet structure
- The kamelet ID - Use this ID in Camel K integrations when you want to reference the kamelet.
- Annotations, such as icon, provide display features for the kamelet.
- Labels allow a user to query kamelets (for example, by kind: "source", "sink", or “action”)
- Description of the kamelet and parameters in JSON-schema specification format.
- The media type of the output (can include a schema).
- The route template that defines the behavior of the kamelet.
4.2. Example source kamelet Link kopierenLink in die Zwischenablage kopiert!
Here is the content of the example coffee-source kamelet:
4.3. Example sink kamelet Link kopierenLink in die Zwischenablage kopiert!
Here is the content of the example log-sink kamelet: