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/04/26 11:20:15 UTC

[camel-kamelets] branch dns-dig-action created (now 81512c8)

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

acosentino pushed a change to branch dns-dig-action
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git.


      at 81512c8  Added DNS Dig Action Kamelet

This branch includes the following new commits:

     new d21e635  Added DNS Dig Action Kamelet
     new 587625a  Added DNS Dig Action Kamelet
     new 81512c8  Added DNS Dig Action Kamelet

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[camel-kamelets] 02/03: Added DNS Dig Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 587625a76597c0b505bb958fcf85739399962884
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Apr 26 13:19:32 2021 +0200

    Added DNS Dig Action Kamelet
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 5358bcd..63add83 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -21,6 +21,7 @@
 * xref:ROOT:cassandra-sink.adoc[image:kamelets/cassandra-sink.svg[] Cassandra Sink]
 * xref:ROOT:cassandra-source.adoc[image:kamelets/cassandra-source.svg[] Cassandra Source]
 * xref:ROOT:cron-source.adoc[image:kamelets/cron-source.svg[] Cron Source]
+* xref:ROOT:dns-dig-action.adoc[image:kamelets/dns-dig-action.svg[] DNS DIG Action]
 * xref:ROOT:dns-ip-action.adoc[image:kamelets/dns-ip-action.svg[] DNS IP Action]
 * xref:ROOT:dropbox-sink.adoc[image:kamelets/dropbox-sink.svg[] Dropbox Sink]
 * xref:ROOT:dropbox-source.adoc[image:kamelets/dropbox-source.svg[] Dropbox Source]

[camel-kamelets] 01/03: Added DNS Dig Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d21e635799334b85b351fcdec7b5d61e1f87514e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Apr 26 13:16:37 2021 +0200

    Added DNS Dig Action Kamelet
---
 dns-dig-action.kamelet.yaml | 66 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/dns-dig-action.kamelet.yaml b/dns-dig-action.kamelet.yaml
new file mode 100644
index 0000000..c2fb484
--- /dev/null
+++ b/dns-dig-action.kamelet.yaml
@@ -0,0 +1,66 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: dns-dig-action
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTIyLjg3OSAxMjIuODgxIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMjIuODc5IDEyMi44ODEiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxnPjxwYXRoIGQ9Ik0xMDkuNDY3LDg5LjUwNWMwLjE4MiwwLDAuMzU5LDAuMDE5LDAuNTMxLDAuMDUzYzEuMT [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "action"
+spec:
+  definition:
+    title: "DNS DIG Action"
+    description: |-
+      Query a DNS through Dig
+
+      The Kamelet expects the following headers to be set:
+
+      - `domain-name` / `ce-domain-name`: as the domain for which we are querying the DNS
+
+      - `dns-type` / `ce-dns-type`: as the DNS type
+
+      If the domain-name header won't be set the body will be used as domain name.
+
+      If the dns-type header won't be set, the DNS Type A will be used.
+  flow:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          when:
+          - simple: "${header[domain-name]}"
+            steps:
+            - set-header:
+                name: dns.name
+                simple: "${header[domain-name]}"
+          - simple: "${header[ce-domain-name]}"
+            steps:
+            - set-header:
+                name: dns.name
+                simple: "${header[ce-domain-name]}"
+          otherwise:
+            steps:
+            - set-header:
+                name: dns.name
+                simple: "${body}"
+      - choice:
+          when:
+          - simple: "${header[dns-type]}"
+            steps:
+            - set-header:
+                name: dns.type
+                simple: "${header[dns-type]}"
+          - simple: "${header[ce-dns-type]}"
+            steps:
+            - set-header:
+                name: dns.type
+                simple: "${header[ce-dns-type]}"
+          otherwise:
+            steps:
+            - set-header:
+                name: dns.type
+                constant: "A"
+      - to:
+          uri: "dns:dig"
+      - convert-body-to:
+          type: "java.lang.String"

[camel-kamelets] 03/03: Added DNS Dig Action Kamelet

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 81512c846b2d8e208d46d95ee7f55cdd95a60371
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Apr 26 13:19:43 2021 +0200

    Added DNS Dig Action Kamelet
---
 .../ROOT/assets/images/kamelets/dns-dig-action.svg |  1 +
 docs/modules/ROOT/pages/dns-dig-action.adoc        | 68 ++++++++++++++++++++++
 2 files changed, 69 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/dns-dig-action.svg b/docs/modules/ROOT/assets/images/kamelets/dns-dig-action.svg
new file mode 100644
index 0000000..dcb3da2
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/dns-dig-action.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="utf-8"?><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 122.879 122.881" enable-background="new 0 0 122.879 122.881" xml:space="preserve"><g><path d="M109.467,89.505c0.182,0,0.359,0.019,0.531,0.053c1.146-1.998,2.191-4.095,3.137-6.287 c0.018-0.043,0.037-0.085,0.059-0.127c1.418-3.346,2.488-6.819,3.209-10.42c0.193-0.961,0.359-1.931,0.5-2.908 c0.639-3.953,0.803-7.97,0.482- [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/dns-dig-action.adoc b/docs/modules/ROOT/pages/dns-dig-action.adoc
new file mode 100644
index 0000000..f4b3198
--- /dev/null
+++ b/docs/modules/ROOT/pages/dns-dig-action.adoc
@@ -0,0 +1,68 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/dns-dig-action.svg[] DNS DIG Action
+
+*Provided by: "Apache Software Foundation"*
+
+Query a DNS through Dig
+
+The Kamelet expects the following headers to be set:
+
+- `domain-name` / `ce-domain-name`: as the domain for which we are querying the DNS
+
+- `dns-type` / `ce-dns-type`: as the DNS type
+
+If the domain-name header won't be set the body will be used as domain name.
+
+If the dns-type header won't be set, the DNS Type A will be used.
+
+== Configuration Options
+
+The Kamelet does not specify any configuration option.
+
+== Usage
+
+This section summarizes how the `dns-dig-action` can be used in various contexts.
+
+=== Knative Action
+
+The `dns-dig-action` Kamelet can be used as intermediate step in a binding.
+
+.dns-dig-action-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: dns-dig-action-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: timer-source
+    properties:
+      message: "Hello"
+  steps:
+  - ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: dns-dig-action
+  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 `dns-dig-action-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the action using the following command:
+
+[source,shell]
+----
+kubectl apply -f dns-dig-action-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT