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

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

commit db36eb851457dd98d0d917edf9ff3e8645812966
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Jun 18 07:42:17 2021 +0200

    Added PostgreSQL Source Kamelet
---
 .../assets/images/kamelets/postgresql-source.svg   |  1 +
 docs/modules/ROOT/pages/postgresql-source.adoc     | 72 ++++++++++++++++++++++
 2 files changed, 73 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/postgresql-source.svg 
b/docs/modules/ROOT/assets/images/kamelets/postgresql-source.svg
new file mode 100644
index 0000000..b102a0e
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/postgresql-source.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" 
xmlns="http://www.w3.org/2000/svg";><title>PostgreSQL icon</title><path 
d="M17.128 0a10.134 10.134 0 0 0-2.755.403l-.063.02A10.922 10.922 0 0 0 
12.6.258C11.422.238 10.41.524 9.594 1 8.79.721 7.122.24 5.364.336 4.14.403 
2.804.775 1.814 1.82.827 2.865.305 4.482.415 6.682c.03.607.203 1.597.49 
2.879s.69 2.783 1.193 4.152c.503 1.37 1.054 2.6 1.915 3.436.43.419 1.022.771 
1.72.742.49-.02.933-.235 
1.315-.552.186.245.385.352.566.451.228.125.45.21.68.266.413.103  [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/postgresql-source.adoc 
b/docs/modules/ROOT/pages/postgresql-source.adoc
new file mode 100644
index 0000000..6839c0a
--- /dev/null
+++ b/docs/modules/ROOT/pages/postgresql-source.adoc
@@ -0,0 +1,72 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/postgresql-source.svg[] PostgreSQL Source
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Query data from a PostgreSQL Database.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the 
`postgresql-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *databaseName {empty}* *| Database Name| The Database Name we are pointing| 
string| | 
+| *password {empty}* *| Password| The password to use for accessing a secured 
PostgreSQL Database| string| | 
+| *query {empty}* *| Query| The Query to execute against the PostgreSQL 
Database| string| | `"INSERT INTO accounts (username,city) VALUES 
(:#username,:#city)"`
+| *serverName {empty}* *| Server Name| Server Name for the data source| 
string| | `"localhost"`
+| *username {empty}* *| Username| The username to use for accessing a secured 
PostgreSQL Database| string| | 
+| consumedQuery| Consumed Query| A query to run on a tuple consumed| string| | 
`"DELETE FROM accounts where user_id = :#user_id"`
+| port| Port| Server Port for the data source| string| `5432`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `postgresql-source` can be used in various 
contexts.
+
+=== Knative Source
+
+The `postgresql-source` Kamelet can be used as Knative source by binding it to 
a Knative object.
+
+.postgresql-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: postgresql-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: postgresql-source
+    properties:
+      databaseName: "The Database Name"
+      password: "The Password"
+      query: "INSERT INTO accounts (username,city) VALUES (:#username,:#city)"
+      serverName: "localhost"
+      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 `postgresql-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 postgresql-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

Reply via email to