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 2022/11/08 11:45:26 UTC
[camel-kamelets] branch main updated: Add Log Action Kamelet
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
The following commit(s) were added to refs/heads/main by this push:
new ca570c93 Add Log Action Kamelet
ca570c93 is described below
commit ca570c934df7092dc3a57df4c114742a9f380c6c
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Tue Nov 8 16:27:40 2022 +0900
Add Log Action Kamelet
---
docs/modules/ROOT/nav.adoc | 1 +
kamelets/log-action.kamelet.yaml | 74 ++++++++++++++++++++++
.../resources/kamelets/log-action.kamelet.yaml | 74 ++++++++++++++++++++++
3 files changed, 149 insertions(+)
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index c39e050e..cc2c6e01 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -125,6 +125,7 @@
* xref:kubernetes-namespaces-source.adoc[]
* xref:kubernetes-nodes-source.adoc[]
* xref:kubernetes-pods-source.adoc[]
+* xref:log-action.adoc[]
* xref:log-sink.adoc[]
* xref:mail-imap-source.adoc[]
* xref:mail-sink.adoc[]
diff --git a/kamelets/log-action.kamelet.yaml b/kamelets/log-action.kamelet.yaml
new file mode 100644
index 00000000..6f980bda
--- /dev/null
+++ b/kamelets/log-action.kamelet.yaml
@@ -0,0 +1,74 @@
+# ---------------------------------------------------------------------------
+# 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/v1alpha1
+kind: Kamelet
+metadata:
+ name: log-action
+ annotations:
+ camel.apache.org/kamelet.support.level: "Stable"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodH [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Logging"
+ labels:
+ camel.apache.org/kamelet.type: "action"
+spec:
+ definition:
+ title: "Log Action"
+ description: |-
+ Logs all data that flows between source and sink, useful for debugging purposes.
+ type: object
+ properties:
+ level:
+ title: Log Level
+ description: Logging level to use
+ type: string
+ default: "INFO"
+ x-descriptors:
+ - 'urn:alm:descriptor:com.tectonic.ui:select:TRACE'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:DEBUG'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:INFO'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:WARN'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:ERROR'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:OFF'
+ showHeaders:
+ title: Show Headers
+ description: Show the headers received
+ type: boolean
+ default: false
+ x-descriptors:
+ - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+ showStreams:
+ title: Show Streams
+ description: Show the stream bodies (they may not be available in following steps)
+ type: boolean
+ default: false
+ x-descriptors:
+ - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+ dependencies:
+ - "camel:kamelet"
+ - "camel:log"
+ template:
+ from:
+ uri: "kamelet:source"
+ steps:
+ - to:
+ uri: "log:log-action"
+ parameters:
+ level: "{{?level}}"
+ showHeaders: "{{?showHeaders}}"
+ showStreams: "{{?showStreams}}"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/log-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/log-action.kamelet.yaml
new file mode 100644
index 00000000..6f980bda
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/log-action.kamelet.yaml
@@ -0,0 +1,74 @@
+# ---------------------------------------------------------------------------
+# 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/v1alpha1
+kind: Kamelet
+metadata:
+ name: log-action
+ annotations:
+ camel.apache.org/kamelet.support.level: "Stable"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodH [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "Logging"
+ labels:
+ camel.apache.org/kamelet.type: "action"
+spec:
+ definition:
+ title: "Log Action"
+ description: |-
+ Logs all data that flows between source and sink, useful for debugging purposes.
+ type: object
+ properties:
+ level:
+ title: Log Level
+ description: Logging level to use
+ type: string
+ default: "INFO"
+ x-descriptors:
+ - 'urn:alm:descriptor:com.tectonic.ui:select:TRACE'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:DEBUG'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:INFO'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:WARN'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:ERROR'
+ - 'urn:alm:descriptor:com.tectonic.ui:select:OFF'
+ showHeaders:
+ title: Show Headers
+ description: Show the headers received
+ type: boolean
+ default: false
+ x-descriptors:
+ - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+ showStreams:
+ title: Show Streams
+ description: Show the stream bodies (they may not be available in following steps)
+ type: boolean
+ default: false
+ x-descriptors:
+ - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+ dependencies:
+ - "camel:kamelet"
+ - "camel:log"
+ template:
+ from:
+ uri: "kamelet:source"
+ steps:
+ - to:
+ uri: "log:log-action"
+ parameters:
+ level: "{{?level}}"
+ showHeaders: "{{?showHeaders}}"
+ showStreams: "{{?showStreams}}"