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

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

commit 681e2d952a13610613c91f67cb508fa84e911164
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Fri Jun 11 15:38:32 2021 +0200

    Added MySQL Sink Kamelet
---
 .../ROOT/assets/images/kamelets/mysql-sink.svg     |  7 ++
 docs/modules/ROOT/pages/mysql-sink.adoc            | 79 ++++++++++++++++++++++
 2 files changed, 86 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/mysql-sink.svg 
b/docs/modules/ROOT/assets/images/kamelets/mysql-sink.svg
new file mode 100644
index 0000000..e7224e2
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/mysql-sink.svg
@@ -0,0 +1,7 @@
+<svg xmlns="http://www.w3.org/2000/svg"; width="32" height="32" version="1">
+ <rect fill="#26557c" width="28" height="28" x="-30" y="-30" rx="1.4" ry="1.4" 
transform="matrix(0,-1,-1,0,0,0)"/>
+ <path opacity=".2" d="m8.0254 8.0001c-0.7825-0.0166-1.1494 0.5244-0.9883 
1.457 0.052 0.3006 0.3152 0.7299 0.8828 1.4419 0.63122 0.7909 0.88514 1.2227 
1.1602 1.9707 0.4336 1.1793 0.63403 1.5748 0.98633 1.9434 0.27366 0.2863 
0.27369 0.28712 0.08984 0.87109-0.28507 0.90556-0.34407 2.7207-0.11523 3.5742 
0.34248 1.2774 0.76402 1.8574 1.3516 1.8574 0.41968 0 0.76364-0.35092 
0.88672-0.9043 0.04268-0.19186 0.12249-0.46607 0.17773-0.60938 0.09535-0.24728 
0.12093-0.22818 0.49414 0.38086 0.21628 0 [...]
+ <path fill="#fff" d="m8.0254 7c-0.7825-0.0166-1.1494 0.5244-0.9883 1.457 
0.052 0.3006 0.3152 0.7302 0.8828 1.4414 0.6312 0.7906 0.8852 1.2226 1.1602 
1.9706 0.4336 1.179 0.634 1.575 0.9859 1.943 0.274 0.287 0.274 0.288 0.09 
0.872-0.2848 0.905-0.3438 2.72-0.115 3.574 0.342 1.277 0.764 1.857 1.352 1.857 
0.419 0 0.763-0.351 0.886-0.904 0.043-0.192 0.123-0.466 0.178-0.609 0.095-0.248 
0.121-0.229 0.494 0.38 0.216 0.353 0.629 0.879 0.916 1.168 0.664 0.669 1.575 
1.422 1.641 1.358 0.028-0.027-0. [...]
+ <path fill="#fff" opacity=".1" d="m3.4004 2c-0.7756 0-1.4004 0.6248-1.4004 
1.4004v1c0-0.7756 0.6248-1.4004 1.4004-1.4004h25.2c0.775 0 1.4 0.6248 1.4 
1.4004v-1c0-0.7756-0.625-1.4004-1.4-1.4004h-25.2z"/>
+ <path opacity=".2" d="m2 28.6v1c0 0.775 0.6248 1.4 1.4004 1.4h25.2c0.775 0 
1.4-0.625 1.4-1.4v-1c0 0.775-0.625 1.4-1.4 1.4h-25.2c-0.7752 
0-1.4-0.625-1.4-1.4z"/>
+</svg>
diff --git a/docs/modules/ROOT/pages/mysql-sink.adoc 
b/docs/modules/ROOT/pages/mysql-sink.adoc
new file mode 100644
index 0000000..03986af
--- /dev/null
+++ b/docs/modules/ROOT/pages/mysql-sink.adoc
@@ -0,0 +1,79 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/mysql-sink.svg[] MySQL Sink
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Send data to a MySQL Database.
+
+In you KameletBinding file you'll need to explicitly declare the mysql driver 
dependency, like in the following YAML snippet
+
+spec:
+  integration:
+    dependencies:
+    - "mvn:mysql:mysql-connector-java:<version>"
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the 
`mysql-sink` 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 
MySQL Database| string| | 
+| *port {empty}* *| Port| Server Port for the data source| string| | `3306`
+| *query {empty}* *| Query| The Query to execute against the MySQL 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 
MySQL Database| string| | 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `mysql-sink` can be used in various contexts.
+
+=== Knative Sink
+
+The `mysql-sink` Kamelet can be used as Knative sink by binding it to a 
Knative object.
+
+.mysql-sink-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: mysql-sink-binding
+spec:
+  source:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  sink:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: mysql-sink
+    properties:
+      databaseName: "The Database Name"
+      password: "The Password"
+      port: 3306
+      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 `mysql-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 mysql-sink-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

Reply via email to