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 97c0ea7fecd8af400f9240d63336292659340c78
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Wed Sep 1 14:34:48 2021 +0200

    Added Kubernetes Namespaces Source Kamelet
---
 .../kamelets/kubernetes-namespaces-source.svg      |  84 ++++++++++++++
 .../ROOT/pages/kubernetes-namespaces-source.adoc   | 126 +++++++++++++++++++++
 2 files changed, 210 insertions(+)

diff --git 
a/docs/modules/ROOT/assets/images/kamelets/kubernetes-namespaces-source.svg 
b/docs/modules/ROOT/assets/images/kamelets/kubernetes-namespaces-source.svg
new file mode 100644
index 0000000..bedd3b8
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/kubernetes-namespaces-source.svg
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/";
+   xmlns:cc="http://creativecommons.org/ns#";
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd";
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape";
+   width="722.8457"
+   height="701.96637"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="logo.svg"
+   inkscape:export-filename="/home/thockin/src/kubernetes/new.png"
+   inkscape:export-xdpi="460.95001"
+   inkscape:export-ydpi="460.95001">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="16.190509"
+     inkscape:cx="277.56851"
+     inkscape:cy="157.54494"
+     inkscape:document-units="px"
+     inkscape:current-layer="g3052"
+     showgrid="false"
+     inkscape:window-width="1519"
+     inkscape:window-height="822"
+     inkscape:window-x="51"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:snap-global="false"
+     fit-margin-top="10"
+     fit-margin-left="10"
+     fit-margin-right="10"
+     fit-margin-bottom="10" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-6.3260942,-174.7524)">
+    <g
+       id="g3052">
+      <path
+         
style="fill:#326ce5;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         d="m 365.3125,184.8125 a 46.724621,46.342246 0 0 0 -17.90625,4.53125 
l -244.34375,116.75 a 46.724621,46.342246 0 0 0 -25.28125,31.4375 L 
17.5,599.78125 A 46.724621,46.342246 0 0 0 23.84375,635.3125 
46.724621,46.342246 0 0 0 26.5,639 l 169.125,210.28125 a 46.724621,46.342246 0 
0 0 36.53125,17.4375 L 503.375,866.65625 A 46.724621,46.342246 0 0 0 
539.90625,849.25 L 708.96875,638.9375 A 46.724621,46.342246 0 0 0 718,599.71875 
l -60.375,-262.25 a 46.724621,46.342246 0 0 0 -25.28125,- [...]
+         id="path3055"
+         inkscape:connector-curvature="0"
+         inkscape:export-filename="new.png"
+         inkscape:export-xdpi="250.55"
+         inkscape:export-ydpi="250.55" />
+      <path
+         inkscape:connector-curvature="0"
+         id="path3059"
+         d="m 367.73366,274.05962 c -8.07696,8.2e-4 -14.62596,7.27591 
-14.625,16.25 1e-5,0.13773 0.0282,0.26934 0.0312,0.40625 -0.0119,1.21936 
-0.0708,2.68836 -0.0312,3.75 0.19262,5.176 1.3209,9.13749 2,13.90625 
1.23028,10.20666 2.26117,18.66736 1.625,26.53125 -0.61869,2.9654 
-2.80288,5.67741 -4.75,7.5625 l -0.34375,6.1875 c -8.77682,0.72717 
-17.61235,2.05874 -26.4375,4.0625 -37.97461,8.62218 -70.67008,28.18307 
-95.5625,54.59375 -1.61522,-1.10193 -4.44103,-3.12914 -5.2813,-3.75 -2.61117, 
[...]
+         
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.25;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibil
 [...]
+         
sodipodi:nodetypes="ccccccccsccccscssccsccccccccscccsccccccccccccccscccscsccsccccscscsccccccccscccscsccccsccccscscscccccccccccccccscccsccccccccccccscccccscccccccccccccccccccccccscccscccccccccscccscccc"
+         inkscape:export-filename="./path3059.png"
+         inkscape:export-xdpi="250.55"
+         inkscape:export-ydpi="250.55" />
+    </g>
+  </g>
+</svg>
diff --git a/docs/modules/ROOT/pages/kubernetes-namespaces-source.adoc 
b/docs/modules/ROOT/pages/kubernetes-namespaces-source.adoc
new file mode 100644
index 0000000..bb0e661
--- /dev/null
+++ b/docs/modules/ROOT/pages/kubernetes-namespaces-source.adoc
@@ -0,0 +1,126 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/kubernetes-namespaces-source.svg[] Kubernetes Namespaces 
source
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Consume Events from Kubernetes Namespaces
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the 
`kubernetes-namespaces-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *masterUrl {empty}* *| Kubernetes Master URL| The Kubernetes Cluster Master 
URL| string| | 
+| *token {empty}* *| Oauth Token| The Auth Token to connect to Kubernetes 
Cluster| string| | 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `kubernetes-namespaces-source` can be used in 
various contexts.
+
+=== Knative Source
+
+The `kubernetes-namespaces-source` Kamelet can be used as Knative source by 
binding it to a Knative object.
+
+.kubernetes-namespaces-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: kubernetes-namespaces-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: kubernetes-namespaces-source
+    properties:
+      masterUrl: "The Kubernetes Master URL"
+      token: "The Oauth Token"
+  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 `kubernetes-namespaces-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 kubernetes-namespaces-source-binding.yaml
+----
+
+==== *Binding to Knative using the Kamel CLI:*
+
+The procedure described above can be simplified into a single execution of the 
`kamel bind` command:
+
+[source,shell]
+----
+kamel bind kubernetes-namespaces-source -p "source.masterUrl=The Kubernetes 
Master URL" -p "source.token=The Oauth Token" channel/mychannel
+----
+
+This will create the KameletBinding under the hood and apply it to the current 
namespace in the cluster.
+
+=== Kafka Source
+
+The `kubernetes-namespaces-source` Kamelet can be used as Kafka source by 
binding it to a Kafka topic.
+
+.kubernetes-namespaces-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: kubernetes-namespaces-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: kubernetes-namespaces-source
+    properties:
+      masterUrl: "The Kubernetes Master URL"
+      token: "The Oauth Token"
+  sink:
+    ref:
+      kind: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
+----
+
+Ensure that you've installed https://strimzi.io/[Strimzi] and created a topic 
named `my-topic` in the current namespace.
+Make also sure you have 
xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the 
Kubernetes cluster you're connected to.
+
+Save the `kubernetes-namespaces-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 kubernetes-namespaces-source-binding.yaml
+----
+
+==== *Binding to Kafka using the Kamel CLI:*
+
+The procedure described above can be simplified into a single execution of the 
`kamel bind` command:
+
+[source,shell]
+----
+kamel bind kubernetes-namespaces-source -p "source.masterUrl=The Kubernetes 
Master URL" -p "source.token=The Oauth Token" 
kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+----
+
+This will create the KameletBinding under the hood and apply it to the current 
namespace in the cluster.
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

Reply via email to