This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch xj-template in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 3cd72710a7ecf0c5e0d2df75551ce372205bb7a4 Author: Andrea Cosentino <[email protected]> AuthorDate: Mon Aug 30 14:31:57 2021 +0200 Added Xj Template Kamelet Action --- .../camel-k/xj-template-action-binding.yaml | 25 ++++++++++++++++++++++ .../bindings/core/xj-template-action-binding.yaml | 14 ++++++++++++ xj-template-action.kamelet.yaml | 2 ++ 3 files changed, 41 insertions(+) diff --git a/templates/bindings/camel-k/xj-template-action-binding.yaml b/templates/bindings/camel-k/xj-template-action-binding.yaml new file mode 100644 index 0000000..b0770bd --- /dev/null +++ b/templates/bindings/camel-k/xj-template-action-binding.yaml @@ -0,0 +1,25 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: KameletBinding +metadata: + name: xj-template-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: xj-template-action + properties: + direction: "The Direction" + template: "The Template" + sink: + ref: + kind: KafkaTopic + apiVersion: kafka.strimzi.io/v1beta1 + name: my-topic diff --git a/templates/bindings/core/xj-template-action-binding.yaml b/templates/bindings/core/xj-template-action-binding.yaml new file mode 100644 index 0000000..98c07b7 --- /dev/null +++ b/templates/bindings/core/xj-template-action-binding.yaml @@ -0,0 +1,14 @@ +- route: + from: + uri: "kamelet:timer-source" + parameters: + period: 1000 + message: "{ \"foo\": \"John\"}" + steps: + - to: + uri: "kamelet:xj-template-action" + parameters: + direction: "The Direction" + template: "The Template" + - to: + uri: "log:info" diff --git a/xj-template-action.kamelet.yaml b/xj-template-action.kamelet.yaml index 23a6e61..3e73809 100644 --- a/xj-template-action.kamelet.yaml +++ b/xj-template-action.kamelet.yaml @@ -15,6 +15,8 @@ spec: title: "XJ Template Action" description: |- Apply the XJ Identity Transformation to transform JSON to XML and XML to JSON. + + The template property needs to be encoded in base64, so when you pass it as parameter, don't forget to encode it. required: - direction - template
