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/12/22 14:16:05 UTC

[camel-kamelets] 04/05: Added Github Tag Source Kamelet - Docs

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

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

commit ab0985ec5bf8651dd8bb1a077cb698346a3f22bb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 22 15:15:16 2021 +0100

    Added Github Tag Source Kamelet - Docs
---
 .../assets/images/kamelets/github-tag-source.svg   |   3 +
 docs/modules/ROOT/pages/github-tag-source.adoc     | 153 +++++++++++++++++++++
 2 files changed, 156 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/github-tag-source.svg b/docs/modules/ROOT/assets/images/kamelets/github-tag-source.svg
new file mode 100644
index 0000000..a8d1174
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/github-tag-source.svg
@@ -0,0 +1,3 @@
+<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7. [...]
+</svg>
diff --git a/docs/modules/ROOT/pages/github-tag-source.adoc b/docs/modules/ROOT/pages/github-tag-source.adoc
new file mode 100644
index 0000000..ef0c6fb
--- /dev/null
+++ b/docs/modules/ROOT/pages/github-tag-source.adoc
@@ -0,0 +1,153 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+
+= image:kamelets/github-tag-source.svg[] Github Tag Source
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Receive Tags From a Github Repository.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `github-tag-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *oauthToken {empty}* *| OAuth Token| Oauth token| string| | 
+| *repoName {empty}* *| Repository Name| The Github Repository name| string| | 
+| *repoOwner {empty}* *| Repository Owner| The repository owner| string| | 
+|===
+
+NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
+
+
+== Dependencies
+
+At runtime, the `github-tag-source` Kamelet relies upon the presence of the following dependencies:
+
+- camel:jackson
+- camel:github
+- camel:kamelet 
+
+== Usage
+
+This section describes how you can use the `github-tag-source`.
+
+=== Knative Source
+
+You can use the `github-tag-source` Kamelet as a Knative source by binding it to a Knative object.
+
+.github-tag-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: github-tag-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: github-tag-source
+    properties:
+      oauthToken: "The OAuth Token"
+      repoName: "The Repository Name"
+      repoOwner: "The Repository Owner"
+  sink:
+    ref:
+      kind: Channel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  
+----
+
+==== *Prerequisite*
+
+You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `github-tag-source-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f github-tag-source-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind github-tag-source -p "source.oauthToken=The OAuth Token" -p "source.repoName=The Repository Name" -p "source.repoOwner=The Repository Owner" channel:mychannel
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+=== Kafka Source
+
+You can use the `github-tag-source` Kamelet as a Kafka source by binding it to a Kafka topic.
+
+.github-tag-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: github-tag-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: github-tag-source
+    properties:
+      oauthToken: "The OAuth Token"
+      repoName: "The Repository Name"
+      repoOwner: "The Repository Owner"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
+----
+
+==== *Prerequisites*
+
+* You've installed https://strimzi.io/[Strimzi].
+* You've created a topic named `my-topic` in the current namespace.
+* You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `github-tag-source-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f github-tag-source-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind github-tag-source -p "source.oauthToken=The OAuth Token" -p "source.repoName=The Repository Name" -p "source.repoOwner=The Repository Owner" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+== Kamelet source file
+
+https://github.com/apache/camel-kamelets/blob/main/kamelets/github-tag-source.kamelet.yaml
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT