This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit c1795d7af1ed8bd0e32a23120a1d29d9d91c41b5 Author: Andrea Cosentino <[email protected]> AuthorDate: Thu Mar 18 13:35:10 2021 +0100 Added File watch source kamelet --- .../assets/images/kamelets/file-watch-source.svg | 75 ++++++++++++++++++++++ docs/modules/ROOT/nav.adoc | 1 + docs/modules/ROOT/pages/file-watch-source.adoc | 61 ++++++++++++++++++ 3 files changed, 137 insertions(+) diff --git a/docs/modules/ROOT/assets/images/kamelets/file-watch-source.svg b/docs/modules/ROOT/assets/images/kamelets/file-watch-source.svg new file mode 100644 index 0000000..5af0dfc --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/file-watch-source.svg @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="0 0 368.553 368.553" style="enable-background:new 0 0 368.553 368.553;" xml:space="preserve"> +<g> + <g> + <path d="M239.68,0H42.695v368.553h283.164V86.811L239.68,0z M244.057,25.7l56.288,56.701h-56.288V25.7z M57.695,353.553V15 + h171.362v82.401h81.802v256.151H57.695V353.553z"/> + <rect x="86.435" y="82.401" width="121.875" height="15"/> + <rect x="86.435" y="151.122" width="195.685" height="15"/> + <rect x="86.435" y="219.843" width="195.685" height="15"/> + <rect x="86.435" y="288.563" width="195.685" height="15"/> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> + <g> + </g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +<g> +</g> +</svg> diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index b0ff6ba..c51a437 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -4,6 +4,7 @@ * xref:ROOT:aws-sqs-source.adoc[image:kamelets/aws-sqs-source.svg[] AWS SQS Source] * xref:ROOT:bitcoin-source.adoc[image:kamelets/bitcoin-source.svg[] Bitcoin Source] * xref:ROOT:earthquake-source.adoc[image:kamelets/earthquake-source.svg[] Earthquake Source] +* xref:ROOT:file-watch-source.adoc[image:kamelets/file-watch-source.svg[] File Watch Source] * xref:ROOT:ftp-source.adoc[image:kamelets/ftp-source.svg[] FTP Source] * xref:ROOT:ftps-source.adoc[image:kamelets/ftps-source.svg[] FTPS Source] * xref:ROOT:github-source.adoc[image:kamelets/github-source.svg[] Github Source] diff --git a/docs/modules/ROOT/pages/file-watch-source.adoc b/docs/modules/ROOT/pages/file-watch-source.adoc new file mode 100644 index 0000000..7e4769a --- /dev/null +++ b/docs/modules/ROOT/pages/file-watch-source.adoc @@ -0,0 +1,61 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/file-watch-source.svg[] File Watch Source + +*Provided by: "Apache Software Foundation"* + +Receive events related to a file or folder. + +== Configuration Options + +The following table summarizes the configuration options available for the `file-watch-source` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *events {empty}* *| The events| The type of events to consume| boolean| `"CREATE,MODIFY,DELETE"`| +| *path {empty}* *| The path| Path of file or folder to watch| string| | +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `file-watch-source` can be used in various contexts. + +=== Knative Source + +The `file-watch-source` Kamelet can be used as Knative source by binding it to a Knative object. + +.file-watch-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: file-watch-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: file-watch-source + properties: + path: "The The path" + 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 `file-watch-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 file-watch-source-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT -- To unsubscrube, please email [email protected]
