From 442df47a03ca3b4f5aea08f2ef38f8d67bac05ef Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Fri, 11 Jun 2021 18:28:17 +0200 Subject: [PATCH] Added PostgreSQL Sink Kamelet --- .../images/kamelets/postgresql-sink.svg | 1 + docs/modules/ROOT/pages/postgresql-sink.adoc | 70 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 docs/modules/ROOT/assets/images/kamelets/postgresql-sink.svg create mode 100644 docs/modules/ROOT/pages/postgresql-sink.adoc diff --git a/docs/modules/ROOT/assets/images/kamelets/postgresql-sink.svg b/docs/modules/ROOT/assets/images/kamelets/postgresql-sink.svg new file mode 100644 index 000000000..b102a0e8b --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/postgresql-sink.svg @@ -0,0 +1 @@ +PostgreSQL icon \ No newline at end of file diff --git a/docs/modules/ROOT/pages/postgresql-sink.adoc b/docs/modules/ROOT/pages/postgresql-sink.adoc new file mode 100644 index 000000000..510d46fe0 --- /dev/null +++ b/docs/modules/ROOT/pages/postgresql-sink.adoc @@ -0,0 +1,70 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT += image:kamelets/postgresql-sink.svg[] PostgreSQL Sink + +*Provided by: "Apache Software Foundation"* + +*Support Level for this Kamelet is: "Preview"* + +Send data to a PostgreSQL Database. + +== Configuration Options + +The following table summarizes the configuration options available for the `postgresql-sink` Kamelet: +[width="100%",cols="2,^2,3,^2,^2,^3",options="header"] +|=== +| Property| Name| Description| Type| Default| Example +| *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| | +| *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| | +| databaseName| Database Name| The Database Name we are pointing| string| `"postgres"`| +| port| Port| Server Port for the data source| string| `5432`| +|=== + +NOTE: Fields marked with ({empty}*) are mandatory. + +== Usage + +This section summarizes how the `postgresql-sink` can be used in various contexts. + +=== Knative Sink + +The `postgresql-sink` Kamelet can be used as Knative sink by binding it to a Knative object. + +.postgresql-sink-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: postgresql-sink-binding +spec: + source: + ref: + kind: InMemoryChannel + apiVersion: messaging.knative.dev/v1 + name: mychannel + sink: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: postgresql-sink + properties: + password: "The Password" + query: "The Query" + serverName: "localhost" + username: "The Username" + +---- + +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-sink-binding.yaml` file into your hard drive, then configure it according to your needs. + +You can run the sink using the following command: + +[source,shell] +---- +kubectl apply -f postgresql-sink-binding.yaml +---- +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT