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 2023/01/11 13:09:08 UTC

[camel-kamelets] branch es-search created (now 8e752b24)

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

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


      at 8e752b24 Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet

This branch includes the following new commits:

     new 7cb629bf Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
     new e4f4ebbf Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
     new 9c6505d1 Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
     new 45febb32 Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
     new 8e752b24 Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet

The 5 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] 01/05: Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet

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

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

commit 7cb629bfbd821a990d0c05f7eb8354234d5bfba6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 11 13:54:34 2023 +0100

    Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/elasticsearch-search-source.kamelet.yaml | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/kamelets/elasticsearch-search-source.kamelet.yaml b/kamelets/elasticsearch-search-source.kamelet.yaml
index 9d853bf3..d98d2d21 100644
--- a/kamelets/elasticsearch-search-source.kamelet.yaml
+++ b/kamelets/elasticsearch-search-source.kamelet.yaml
@@ -80,6 +80,10 @@ spec:
         title: ElasticSearch Cluster Name
         description: The name of the cluster.
         type: string
+      certificate:
+        title: Certificate 
+        description: The Certificate for accessing the Elasticsearch cluster. You must encode this value in base64.
+        type: string
   types:
     out:
       mediaType: application/json
@@ -87,12 +91,12 @@ spec:
       - "camel:core"
       - "camel:kamelet"
       - "camel:timer"
-      - "camel:elasticsearch-rest"
+      - "camel:elasticsearch"
       - "camel:gson"
   template:
     beans:
       - name: local-es
-        type: "#class:org.apache.camel.component.elasticsearch.ElasticsearchComponent"
+        type: "#class:org.apache.camel.component.es.ElasticsearchComponent"
         properties:
             user: "{{?user}}"
             password: "{{?password}}"
@@ -102,10 +106,7 @@ spec:
         period: "{{period}}"
       steps:
         - set-body:
-            constant: "{{query}}"
-        - set-header:
-            name: "Content-Type"
-            constant: "text/plain"
+            constant: "{{query?nested=false}}"
         - to:
             uri: "{{local-es}}:{{clusterName}}"
             parameters:
@@ -113,6 +114,7 @@ spec:
               indexName: "{{indexName}}"
               hostAddresses: "{{hostAddresses}}"
               enableSSL: "{{enableSSL}}"
+              certificatePath: "base64:{{?certificate}}"
         - marshal:
             json:
               library: Gson


[camel-kamelets] 02/05: Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet

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

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

commit e4f4ebbfe40e8a84a806e658455d579f678b7344
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 11 13:55:22 2023 +0100

    Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../kamelets/elasticsearch-search-source.kamelet.yaml      | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-search-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-search-source.kamelet.yaml
index 9d853bf3..d98d2d21 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-search-source.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-search-source.kamelet.yaml
@@ -80,6 +80,10 @@ spec:
         title: ElasticSearch Cluster Name
         description: The name of the cluster.
         type: string
+      certificate:
+        title: Certificate 
+        description: The Certificate for accessing the Elasticsearch cluster. You must encode this value in base64.
+        type: string
   types:
     out:
       mediaType: application/json
@@ -87,12 +91,12 @@ spec:
       - "camel:core"
       - "camel:kamelet"
       - "camel:timer"
-      - "camel:elasticsearch-rest"
+      - "camel:elasticsearch"
       - "camel:gson"
   template:
     beans:
       - name: local-es
-        type: "#class:org.apache.camel.component.elasticsearch.ElasticsearchComponent"
+        type: "#class:org.apache.camel.component.es.ElasticsearchComponent"
         properties:
             user: "{{?user}}"
             password: "{{?password}}"
@@ -102,10 +106,7 @@ spec:
         period: "{{period}}"
       steps:
         - set-body:
-            constant: "{{query}}"
-        - set-header:
-            name: "Content-Type"
-            constant: "text/plain"
+            constant: "{{query?nested=false}}"
         - to:
             uri: "{{local-es}}:{{clusterName}}"
             parameters:
@@ -113,6 +114,7 @@ spec:
               indexName: "{{indexName}}"
               hostAddresses: "{{hostAddresses}}"
               enableSSL: "{{enableSSL}}"
+              certificatePath: "base64:{{?certificate}}"
         - marshal:
             json:
               library: Gson


[camel-kamelets] 05/05: Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet

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

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

commit 8e752b24caca38abe93ba20412a172b4aff29ece
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 11 14:07:43 2023 +0100

    Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../main/resources/kamelets/elasticsearch-search-source.kamelet.yaml  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-search-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-search-source.kamelet.yaml
index d98d2d21..356545ee 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-search-source.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-search-source.kamelet.yaml
@@ -31,6 +31,10 @@ spec:
     title: "ElasticSearch Search Source"
     description: |-
       Search data on ElasticSearch
+      
+      The `query` parameter must be formatted in JSON.
+
+      If you specify the `certificate` property, you must base64 encode it before you pass it as a parameter.
     required:
       - query
       - clusterName


[camel-kamelets] 04/05: Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet

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

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

commit 45febb32698b6aec6a207855b0a06a7b3c96112e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 11 14:06:06 2023 +0100

    Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/elasticsearch-search-source.kamelet.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kamelets/elasticsearch-search-source.kamelet.yaml b/kamelets/elasticsearch-search-source.kamelet.yaml
index d98d2d21..356545ee 100644
--- a/kamelets/elasticsearch-search-source.kamelet.yaml
+++ b/kamelets/elasticsearch-search-source.kamelet.yaml
@@ -31,6 +31,10 @@ spec:
     title: "ElasticSearch Search Source"
     description: |-
       Search data on ElasticSearch
+      
+      The `query` parameter must be formatted in JSON.
+
+      If you specify the `certificate` property, you must base64 encode it before you pass it as a parameter.
     required:
       - query
       - clusterName


[camel-kamelets] 03/05: Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet

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

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

commit 9c6505d1e798456895e1e038b372d6e74cfc253d
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Jan 11 13:58:00 2023 +0100

    Elasticsearch Kamelets: Moving from Camel-Elasticsearch-Rest to Camel-Elastichsearch - Search Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 script/validator/validator.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/script/validator/validator.go b/script/validator/validator.go
index c880695c..0c37cbb7 100644
--- a/script/validator/validator.go
+++ b/script/validator/validator.go
@@ -410,7 +410,7 @@ func listKamelets(dir string) []KameletInfo {
 
 func verifyUsedParams(kamelets []KameletInfo) (errors []error) {
 	for _, k := range kamelets {
-	        if (k.FileName != "../../kamelets/azure-storage-blob-source.kamelet.yaml" && k.FileName != "../../kamelets/aws-s3-cdc-source.kamelet.yaml" && k.FileName != "../../kamelets/azure-storage-blob-cdc-source.kamelet.yaml" && k.FileName != "../../kamelets/google-storage-cdc-source.kamelet.yaml") {
+	        if (k.FileName != "../../kamelets/azure-storage-blob-source.kamelet.yaml" && k.FileName != "../../kamelets/aws-s3-cdc-source.kamelet.yaml" && k.FileName != "../../kamelets/azure-storage-blob-cdc-source.kamelet.yaml" && k.FileName != "../../kamelets/google-storage-cdc-source.kamelet.yaml" && k.FileName != "../../kamelets/elasticsearch-search-source.kamelet.yaml") {
 		used := getUsedParams(k.Kamelet)
 		declared := getDeclaredParams(k.Kamelet)
 		for p := range used {