kamelets.elasticsearch-search-source.kamelet.yaml Maven / Gradle / Ivy
The newest version!
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1
kind: Kamelet
metadata:
name: elasticsearch-search-source
labels:
camel.apache.org/kamelet.type: "source"
annotations:
camel.apache.org/kamelet.support.level: "Stable"
camel.apache.org/catalog.version: "4.8.0"
camel.apache.org/kamelet.group: "ElasticSearch"
camel.apache.org/kamelet.namespace: "Search"
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1NTAgMjUwIiB2aWV3Qm94PSI3Nyw4Myw0MTAsOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiA8cGF0aCBkPSJtMTc4IDEwMi41aDMxM3Y0MWgtMzEzeiIgZmlsbD0ibm9uZSIvPgogPGcgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyI+CiAgPHBhdGggZD0ibTE5My4zIDEzOS40Yy00IDAtNy4yLTEuMi05LjUtMy41cy0zLjQtNS42LTMuNC05LjdjMC00LjIgMS4xLTcuNiAzLjItMTBzNS0zLjYgOC43LTMuNmMzLjQgMCA2LjEgMSA4LjEgMy4xczMgNC45IDMgOC42djNoLTE3LjNjLjEgMi41LjggN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LjYgMjIgNi42IDEzLjkgMCAyNi4xLTcuMSAzMy4zLTE3LjgtMy43LTMuOC04LjktNi4yLTE0LjYtNi4yeiIgZmlsbD0iIzAwYmZiMyIvPgogPHBhdGggZD0ibTExNi43IDE0OC42YzEtMS42IDEuOS0zLjMgMi43LTUuMWgtMjkuM2MzLjEgNy4xIDguMiAxMy4yIDE0LjcgMTcuNCAxLjYtMS4xIDMuMS0yLjIgNC42LTMuNS43LS42IDEuNC0xLjMgMi4xLTIgMS45LTIgMy43LTQuMyA1LjItNi44eiIgZmlsbD0iIzAxOWI4ZiIvPgogPHBhdGggZD0ibTExMS40IDk5LjZjLS43LS43LTEuNC0xLjMtMi4xLTItMS40LTEuMy0zLTIuNC00LjYtMy41LTYuNCA0LjItMTEuNSAxMC4zLTE0LjcgMTcuNGgyOS4zYy0uOC0xLjgtMS43LTMuNS0yLjctNS4xLTEuNC0yLjUtMy4yLTQuOC01LjItNi44eiIgZmlsbD0iI2Y5YjExMCIvPgogPHBhdGggZD0ibTEyNi43IDg3LjVjLTguMSAwLTE1LjcgMi40LTIyIDYuNiAxLjYgMS4xIDMuMSAyLjIgNC42IDMuNS43LjYgMS40IDEuMyAyLjEgMiAyIDIuMSAzLjggNC4zIDUuMyA2LjggMSAxLjYgMS45IDMuMyAyLjcgNS4xaDI2YzUuNyAwIDEwLjktMi40IDE0LjYtNi4yLTcuMi0xMC43LTE5LjQtMTcuOC0zMy4zLTE3Ljh6IiBmaWxsPSIjZmVkMTBhIi8+Cjwvc3ZnPg=="
spec:
definition:
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
- indexName
- hostAddresses
type: object
properties:
period:
title: Period
description: The time interval between two searches
type: integer
default: 1000
query:
title: Query
description: The query we want to use to search on ElasticSearch.
type: string
user:
title: Username
description: Username to connect to ElasticSearch.
type: string
x-descriptors:
- urn:camel:group:credentials
password:
title: Password
description: Password to connect to ElasticSearch.
type: string
format: password
x-descriptors:
- urn:camel:group:credentials
enableSSL:
title: Enable SSL
description: Do we want to connect using SSL?
type: boolean
default: true
hostAddresses:
title: Host Addresses
description: Comma separated list with ip:port formatted remote transport addresses to use.
type: string
indexName:
title: Index in ElasticSearch
description: The name of the index to act against.
type: string
clusterName:
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
dependencies:
- "camel:core"
- "camel:kamelet"
- "camel:timer"
- "camel:elasticsearch"
- "camel:gson"
template:
beans:
- name: local-es
type: "#class:org.apache.camel.component.es.ElasticsearchComponent"
properties:
user: "{{?user}}"
password: "{{?password}}"
from:
uri: timer:tick
parameters:
period: "{{period}}"
steps:
- setBody:
constant: "{{query?nested=false}}"
- to:
uri: "{{local-es}}:{{clusterName}}"
parameters:
operation: "SEARCH"
indexName: "{{indexName}}"
hostAddresses: "{{hostAddresses}}"
enableSSL: "{{enableSSL}}"
certificatePath: "base64:{{?certificate}}"
- marshal:
json:
library: Gson
- to: kamelet:sink