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 2b25a91303edc880e36c12c2309c78ae7e854a6d Author: Andrea Cosentino <[email protected]> AuthorDate: Wed Dec 22 15:25:14 2021 +0100 Added Github Events Source Kamelet - Docs --- .../assets/images/kamelets/github-event-source.svg | 3 + docs/modules/ROOT/pages/github-event-source.adoc | 153 +++++++++++++++++++++ 2 files changed, 156 insertions(+) diff --git a/docs/modules/ROOT/assets/images/kamelets/github-event-source.svg b/docs/modules/ROOT/assets/images/kamelets/github-event-source.svg new file mode 100644 index 0000000..a8d1174 --- /dev/null +++ b/docs/modules/ROOT/assets/images/kamelets/github-event-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-event-source.adoc b/docs/modules/ROOT/pages/github-event-source.adoc new file mode 100644 index 0000000..f68542e --- /dev/null +++ b/docs/modules/ROOT/pages/github-event-source.adoc @@ -0,0 +1,153 @@ +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT + += image:kamelets/github-event-source.svg[] Github Event Source + +*Provided by: "Apache Software Foundation"* + +*Support Level for this Kamelet is: "Preview"* + +Receive Events From a Github Repository. + +== Configuration Options + +The following table summarizes the configuration options available for the `github-event-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-event-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-event-source`. + +=== Knative Source + +You can use the `github-event-source` Kamelet as a Knative source by binding it to a Knative object. + +.github-event-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: github-event-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: github-event-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-event-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-event-source-binding.yaml +---- + +==== *Procedure for using the Kamel CLI* + +Configure and run the source by using the following command: + +[source,shell] +---- +kamel bind github-event-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-event-source` Kamelet as a Kafka source by binding it to a Kafka topic. + +.github-event-source-binding.yaml +[source,yaml] +---- +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: github-event-source-binding +spec: + source: + ref: + kind: Kamelet + apiVersion: camel.apache.org/v1alpha1 + name: github-event-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-event-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-event-source-binding.yaml +---- + +==== *Procedure for using the Kamel CLI* + +Configure and run the source by using the following command: + +[source,shell] +---- +kamel bind github-event-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-event-source.kamelet.yaml + +// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
