You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/04/15 14:23:09 UTC

[camel-kamelets] 04/04: Added Cron Source Kamelet

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch cron-source
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit aa3d55674c68c3ed19d5a3309c8e9bf783d48b33
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Apr 15 16:22:43 2021 +0200

    Added Cron Source Kamelet
---
 .../ROOT/assets/images/kamelets/cron-source.svg    |  1 +
 docs/modules/ROOT/pages/cron-source.adoc           | 62 ++++++++++++++++++++++
 2 files changed, 63 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/cron-source.svg b/docs/modules/ROOT/assets/images/kamelets/cron-source.svg
new file mode 100644
index 0000000..0716e77
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/cron-source.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="2500" height="2500" viewBox="0 0 192.756 192.756"><g fill-rule="evenodd" clip-rule="evenodd"><path fill="#fff" d="M0 0h192.756v192.756H0V0z"/><path d="M42.16 103.072l5.901 1.496c-1.242 4.865-3.476 8.574-6.701 11.129s-7.167 3.832-11.826 3.832c-4.823 0-8.746-.982-11.767-2.947-3.021-1.965-5.322-4.811-6.898-8.537-1.576-3.725-2.365-7.727-2.365-12.002 0-4.663.89-8.73 2.669-12.202 1.779-3.472 4.312-6.108 7.597-7.91 3.285-1.802 6.9-2.704 10.847-2.70 [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/cron-source.adoc b/docs/modules/ROOT/pages/cron-source.adoc
new file mode 100644
index 0000000..7c491ed
--- /dev/null
+++ b/docs/modules/ROOT/pages/cron-source.adoc
@@ -0,0 +1,62 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/cron-source.svg[] Cron Source
+
+*Provided by: "Apache Software Foundation"*
+
+Send events at specific time.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `cron-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *message {empty}* *| Message| The message to generate| string| | `"hello world"`
+| *schedule {empty}* *| Cron Schedule| A cron expression that will be used to generate events| string| | `"0/3 10 * * * ?"`
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `cron-source` can be used in various contexts.
+
+=== Knative Source
+
+The `cron-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.cron-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: cron-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: cron-source
+    properties:
+      message: "hello world"
+      schedule: "0/3 10 * * * ?"
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `cron-source-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the source using the following command:
+
+[source,shell]
+----
+kubectl apply -f cron-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT