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/03/08 08:00:38 UTC

[camel-kamelets] 02/02: Added SFTP source kamelet

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

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

commit 55db2c511a1c11de8da7d7717f7601be38a29636
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 8 09:00:14 2021 +0100

    Added SFTP source kamelet
---
 .../ROOT/assets/images/kamelets/sftp-source.svg    |  1 +
 docs/modules/ROOT/nav.adoc                         |  1 +
 docs/modules/ROOT/pages/sftp-source.adoc           | 69 ++++++++++++++++++++++
 3 files changed, 71 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/sftp-source.svg b/docs/modules/ROOT/assets/images/kamelets/sftp-source.svg
new file mode 100644
index 0000000..4c77024
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/sftp-source.svg
@@ -0,0 +1 @@
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 221.1 300" xml:space="preserve"><style></style><circle cx="111.6" cy="192" r="88.6" fill="#2b3990"/><path d="M110.6 100.2c-50.8 0-92.2 41.4-92.2 92.2 0 50.9 41.4 92.2 92.2 92.2 50.8 0 92.2-41.4 92.2-92.2 0-50.8-41.4-92.2-92.2-92.2zm72.6 44c-7 6.8-13.3 14.4-18.6 22.7-.5-.1-.9-.2-1.4-.2-1 0-1.9.3-2.8.7-4.6-6.5-8.4-13.1-11.3-19.6 1.7-1.1 2.8-3 2.8-5.2 0-.6-.1-1.1-.3-1.7 6.3-4.4 11.7-9.3 16-14.3 6 5.1 [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index e512fe2..7847c80 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -12,6 +12,7 @@
 * xref:ROOT:mqtt-source.adoc[image:kamelets/mqtt-source.svg[] MQTT Source]
 * xref:ROOT:nats-source.adoc[image:kamelets/nats-source.svg[] NATS Source]
 * xref:ROOT:salesforce-source.adoc[image:kamelets/salesforce-source.svg[] Salesforce Source]
+* xref:ROOT:sftp-source.adoc[image:kamelets/sftp-source.svg[] SFTP Source]
 * xref:ROOT:slack-source.adoc[image:kamelets/slack-source.svg[] Slack Source]
 * xref:ROOT:telegram-source.adoc[image:kamelets/telegram-source.svg[] Telegram Source]
 * xref:ROOT:timer-source.adoc[image:kamelets/timer-source.svg[] Timer Source]
diff --git a/docs/modules/ROOT/pages/sftp-source.adoc b/docs/modules/ROOT/pages/sftp-source.adoc
new file mode 100644
index 0000000..69d25fc
--- /dev/null
+++ b/docs/modules/ROOT/pages/sftp-source.adoc
@@ -0,0 +1,69 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/sftp-source.svg[] SFTP Source
+
+*Provided by: "Apache Software Foundation"*
+
+Receive data from an SFTP Server.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `sftp-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *directoryName {empty}* *| Directory Name| The starting directory| string| | 
+| *host {empty}* *| Host| Hostname of the SFTP server| string| | 
+| *password {empty}* *| Password| The password to access the SFTP server| string| | 
+| *port {empty}* *| Port| Port of the FTP server| string| `22`| 
+| *username {empty}* *| Username| The username to access the SFTP server| string| | 
+| passiveMode| Passive Mode| Sets passive mode connection| boolean| `false`| 
+| recursive| Recursive| If a directory, will look for files in all the sub-directories as well.| boolean| `false`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `sftp-source` can be used in various contexts.
+
+=== Knative Source
+
+The `sftp-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.sftp-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: sftp-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: sftp-source
+    properties:
+      directoryName: "The Directory Name"
+      host: "The Host"
+      password: "The Password"
+      username: "The Username"
+  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 `sftp-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 sftp-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT