lburgazzoli opened a new issue #1567:
URL: https://github.com/apache/camel-k/issues/1567


   Some time ago we have been discussing about introducing the concept of 
**Kamelet** which in essence is a way to describe a reusable route people can 
leverage to provide ready-to use functionalities. As example, it will be 
possible to use a Kamelet to create a [Knative Camel 
Sources](https://knative.dev/docs/eventing/samples/apache-camel-source/) but 
also to create a [Kafka Camel 
Connectors](https://camel.apache.org/camel-kafka-connector/latest/index.html).
   
   A **Kamelet** definition could look like::
   
   ```yaml
   apiVersion: camel.apache.org/v1alpha1
   kind: Kamelet
   metadata:
     name: timer
     annotations:
       camel.apache.org/kamelet.icon: timer
   spec:
     definition:
       title: "Timer"
       description: "Produces produces periodic events with a custom payload"
       required:
         - message
       properties:
         message:
           title: Message
           description: The message to generate
           type: string
     types:
       out:
         mediaType: application/json
         schema:
           id: text.camel.apache.org
           type: string
     flow:
       from:
         uri: timer:tick
         steps:
           - set-body:
               constant: "Hello {{message}} !!!"
           - to: "log:info"
   ```
   
   The mechanics of materializing the **Kamelet** could be something like:
   1. the operator inspects the sources and collect what **Kamelets** are 
required
   2. the operator look-up the **Kamelets** from k8s
   3. the operator mounts the **Kamelets** as it would do for any other source 
but in a different location, says `/etc/camel/kamelets.d`
   4. the [camel-k-runtime](https://github.com/apache/camel-k-runtime) will 
load and materialize the **Kamelets** at runtime 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to