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

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

commit 6a9d162fe0ec50fbc33dd2759f9c3a1a246ae0f6
Author: nicolaferraro <[email protected]>
AuthorDate: Fri Feb 19 15:29:50 2021 +0100

    add a webhook kamelet
---
 .../ROOT/assets/images/kamelets/webhook-source.svg |  1 +
 docs/modules/ROOT/nav.adoc                         |  1 +
 docs/modules/ROOT/pages/webhook-source.adoc        | 64 ++++++++++++++++++++++
 webhook-source.kamelet.yaml                        | 31 +++++++++++
 4 files changed, 97 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/webhook-source.svg 
b/docs/modules/ROOT/assets/images/kamelets/webhook-source.svg
new file mode 100644
index 0000000..9f46094
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/webhook-source.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"; viewBox="944 -771 2500 2334"><path 
d="M2111.4 210.5c-103.6 174.2-202.9 342.9-304.2 510.3-26 43-38.9 78-18.1 132.6 
57.4 150.9-23.6 297.8-175.8 337.6-143.5 37.6-283.4-56.7-311.8-210.4-25.2-136 
80.3-269.3 230.3-290.6 12.6-1.8 25.4-2 
46.5-3.6l228.1-382.5c-143.5-142.7-228.9-309.4-210-516 13.4-146.1 70.8-272.3 
175.8-375.8 201-198.1 507.8-230.2 744.5-78.1 227.4 146.1 331.5 430.6 242.8 
674.1-66.9-18.1-134.3-36.4-208.4-56.5 27.9-135.4 7.3-257-84.1-361.1-60. [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index efa5ec4..3fa086a 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -10,4 +10,5 @@
 * xref:ROOT:slack-source.adoc[image:kamelets/slack-source.svg[] Slack Source]
 * xref:ROOT:telegram-source.adoc[image:kamelets/telegram-source.svg[] Telegram 
Source]
 * xref:ROOT:timer-source.adoc[image:kamelets/timer-source.svg[] Timer Source]
+* xref:ROOT:webhook-source.adoc[image:kamelets/webhook-source.svg[] Webhook 
Source]
 // THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
diff --git a/docs/modules/ROOT/pages/webhook-source.adoc 
b/docs/modules/ROOT/pages/webhook-source.adoc
new file mode 100644
index 0000000..0d492a6
--- /dev/null
+++ b/docs/modules/ROOT/pages/webhook-source.adoc
@@ -0,0 +1,64 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/webhook-source.svg[] Webhook Source
+
+*Provided by: "Apache Software Foundation"*
+
+Creates an HTTP endpoint that can be used as a bridge to forward data to the 
Kamelet sink.
+
+The "subpath" parameter of the Webhook source allows to customize the subpath 
where the integration will respond to HTTP requests.
+It's common to use a non-guessable ID for that parameter.
+
+When the "subpath" parameter is set to "webhook" (default), the integration 
will accept requests at the "https://integration-external-url/webhook"; endpoint.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the 
`webhook-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| subpath| Subpath| The subpath where the webhook is registered
+| string| `"webhook"`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `webhook-source` can be used in various 
contexts.
+
+=== Knative Source
+
+The `webhook-source` Kamelet can be used as Knative source by binding it to a 
Knative object.
+
+.webhook-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: webhook-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: webhook-source
+  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 `webhook-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 webhook-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
diff --git a/webhook-source.kamelet.yaml b/webhook-source.kamelet.yaml
new file mode 100644
index 0000000..63e2f8a
--- /dev/null
+++ b/webhook-source.kamelet.yaml
@@ -0,0 +1,31 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: webhook-source
+  annotations:
+    camel.apache.org/kamelet.icon: 
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ijk0NCAtNzcxIDI1MDAgMjMzNCI+PHBhdGggZD0iTTIxMTEuNCAyMTAuNWMtMTAzLjYgMTc0LjItMjAyLjkgMzQyLjktMzA0LjIgNTEwLjMtMjYgNDMtMzguOSA3OC0xOC4xIDEzMi42IDU3LjQgMTUwLjktMjMuNiAyOTcuOC0xNzUuOCAzMzcuNi0xNDMuNSAzNy42LTI4My40LTU2LjctMzExLjgtMjEwLjQtMjUuMi0xMzYgODAuMy0yNjkuMyAyMzAuMy0yOTAuNiAxMi42LTEuOCAyNS40LTIgNDYuNS0zLjZsMjI4LjEtMzgyLjVjLTE0My41LTE0Mi43LTIyOC45LTMwOS40LTIxMC01MT
 [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "Webhook Source"
+    description: |-
+      Creates an HTTP endpoint that can be used as a bridge to forward data to 
the Kamelet sink.
+
+      The "subpath" parameter of the Webhook source allows to customize the 
subpath where the integration will respond to HTTP requests.
+      It's common to use a non-guessable ID for that parameter.
+
+      When the "subpath" parameter is set to "webhook" (default), the 
integration will accept requests at the 
"https://integration-external-url/webhook"; endpoint.
+    properties:
+      subpath:
+        title: Subpath
+        description: |
+          The subpath where the webhook is registered
+        type: string
+        default: "webhook"
+  flow:
+    from:
+      uri: "platform-http:///{{subpath}}";
+      steps:
+      - to: "kamelet:sink"

Reply via email to