From 1301641a28ff3d3fd6d584986993a5cb7730d55a Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 12 Feb 2024 13:55:30 +0100 Subject: [PATCH 1/4] Added Azure Files Sink Kamelet Signed-off-by: Andrea Cosentino --- .../azure-storage-files-sink.kamelet.yaml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 kamelets/azure-storage-files-sink.kamelet.yaml diff --git a/kamelets/azure-storage-files-sink.kamelet.yaml b/kamelets/azure-storage-files-sink.kamelet.yaml new file mode 100644 index 000000000..4aea5802b --- /dev/null +++ b/kamelets/azure-storage-files-sink.kamelet.yaml @@ -0,0 +1,100 @@ +# --------------------------------------------------------------------------- +# 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: azure-storage-files-sink + annotations: + camel.apache.org/kamelet.support.level: "Stable" + camel.apache.org/catalog.version: "4.4.0-SNAPSHOT" + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgOTEgODEiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bm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zNS0xLjE5OCAxLjQwMy0xLjQzNy43MDEtLjI0IDEuNDAzLS40NzkgMi4zMzgtLjQ3OXMxLjYzNi4yNCAyLjMzOC40NzlhMi4xMyAyLjEzIDAgMCAxIDEuNDAzIDEuNDM3Yy4yMzQuNzE4LjcwMSAxLjQzNy43MDEgMi4xNTYuMjM0Ljk1OC4yMzQgMS45MTYuMjM0IDIuODc0IDAgMS4xOTgtLjIzNCAyLjE1Ni0uMjM0IDIuODc0eiIgZmlsbD0iIzAwNzhkNyIgc3Ryb2tlPSJub25lIi8+PC9zeW1ib2w+PC9zdmc+" + camel.apache.org/provider: "Apache Software Foundation" + camel.apache.org/kamelet.group: "Azure Storage Blob" + camel.apache.org/kamelet.namespace: "Azure" + labels: + camel.apache.org/kamelet.type: "sink" +spec: + definition: + title: "Azure Storage Files Sink" + description: |- + Upload data to Azure Storage Files Share. + + In the header, you can set the `file` / `ce-file` property to specify the filename to upload. If you do set property in the header, the Kamelet uses the exchange ID as filename. + required: + - accountName + - containerName + type: object + properties: + accountName: + title: Account Name + description: The Azure Storage Blob account name. + type: string + x-descriptors: + - urn:camel:group:credentials + shareName: + title: Share Name + description: The Azure Storage File Share share name. + type: string + sharedKey: + title: Shared Access Key + description: The Azure Storage Blob access key. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + credentialType: + title: Credential Type + description: Determines the credential strategy to adopt. + type: string + enum: ["SHARED_ACCOUNT_KEY", "AZURE_IDENTITY", "SHARED_KEY_CREDENTIAL", "AZURE_SAS"] + default: "SHARED_ACCOUNT_KEY" + directoryName: + title: Directory Name + description: The directory from where the producer will upload the file. + type: string + default: "." + dependencies: + - "camel:core" + - "camel:azure-storage-blob" + - "camel:kamelet" + template: + from: + uri: "kamelet:source" + steps: + - choice: + when: + - simple: "${header[file]}" + steps: + - setHeader: + name: CamelFileName + simple: "${header[file]}" + - simple: "${header[ce-file]}" + steps: + - setHeader: + name: CamelFileName + simple: "${header[ce-file]}" + otherwise: + steps: + - setHeader: + name: CamelFileName + simple: "${exchangeId}" + - to: + uri: "azure-files://{{accountName}}/{{shareName}}/{{directoryName}}" + parameters: + sharedKey: "{{?sharedKey}}" + credentialType: "{{credentialType}}" From 1261eafd3b1a3f73b8e547f428f84d79bfeeec3a Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 12 Feb 2024 13:56:28 +0100 Subject: [PATCH 2/4] Added Azure Files Sink Kamelet Signed-off-by: Andrea Cosentino --- .../azure-storage-files-sink.kamelet.yaml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 library/camel-kamelets/src/main/resources/kamelets/azure-storage-files-sink.kamelet.yaml diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-files-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-files-sink.kamelet.yaml new file mode 100644 index 000000000..4aea5802b --- /dev/null +++ b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-files-sink.kamelet.yaml @@ -0,0 +1,100 @@ +# --------------------------------------------------------------------------- +# 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: azure-storage-files-sink + annotations: + camel.apache.org/kamelet.support.level: "Stable" + camel.apache.org/catalog.version: "4.4.0-SNAPSHOT" + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd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LTEuNDM3Yy0uMjM0LS40NzktLjcwMS0xLjQzNy0uNzAxLTIuMTU2cy0uMjM0LTEuOTE2LS4yMzQtMi44NzRjMC0xLjE5OCAwLTIuMTU2LjIzNC0yLjg3NC4yMzQtLjk1OC40NjgtMS42NzcuOTM1LTIuMTU2LjQ2OC0uNzE4LjkzNS0xLjE5OCAxLjQwMy0xLjQzNy43MDEtLjI0IDEuNDAzLS40NzkgMi4zMzgtLjQ3OXMxLjYzNi4yNCAyLjMzOC40NzlhMi4xMyAyLjEzIDAgMCAxIDEuNDAzIDEuNDM3Yy4yMzQuNzE4LjcwMSAxLjQzNy43MDEgMi4xNTYuMjM0Ljk1OC4yMzQgMS45MTYuMjM0IDIuODc0IDAgMS4xOTgtLjIzNCAyLjE1Ni0uMjM0IDIuODc0eiIgZmlsbD0iIzAwNzhkNyIgc3Ryb2tlPSJub25lIi8+PC9zeW1ib2w+PC9zdmc+" + camel.apache.org/provider: "Apache Software Foundation" + camel.apache.org/kamelet.group: "Azure Storage Blob" + camel.apache.org/kamelet.namespace: "Azure" + labels: + camel.apache.org/kamelet.type: "sink" +spec: + definition: + title: "Azure Storage Files Sink" + description: |- + Upload data to Azure Storage Files Share. + + In the header, you can set the `file` / `ce-file` property to specify the filename to upload. If you do set property in the header, the Kamelet uses the exchange ID as filename. + required: + - accountName + - containerName + type: object + properties: + accountName: + title: Account Name + description: The Azure Storage Blob account name. + type: string + x-descriptors: + - urn:camel:group:credentials + shareName: + title: Share Name + description: The Azure Storage File Share share name. + type: string + sharedKey: + title: Shared Access Key + description: The Azure Storage Blob access key. + type: string + format: password + x-descriptors: + - urn:camel:group:credentials + credentialType: + title: Credential Type + description: Determines the credential strategy to adopt. + type: string + enum: ["SHARED_ACCOUNT_KEY", "AZURE_IDENTITY", "SHARED_KEY_CREDENTIAL", "AZURE_SAS"] + default: "SHARED_ACCOUNT_KEY" + directoryName: + title: Directory Name + description: The directory from where the producer will upload the file. + type: string + default: "." + dependencies: + - "camel:core" + - "camel:azure-storage-blob" + - "camel:kamelet" + template: + from: + uri: "kamelet:source" + steps: + - choice: + when: + - simple: "${header[file]}" + steps: + - setHeader: + name: CamelFileName + simple: "${header[file]}" + - simple: "${header[ce-file]}" + steps: + - setHeader: + name: CamelFileName + simple: "${header[ce-file]}" + otherwise: + steps: + - setHeader: + name: CamelFileName + simple: "${exchangeId}" + - to: + uri: "azure-files://{{accountName}}/{{shareName}}/{{directoryName}}" + parameters: + sharedKey: "{{?sharedKey}}" + credentialType: "{{credentialType}}" From e8b964ca5a69a95ac3a84ef15a3bc0259afbe209 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 12 Feb 2024 13:57:02 +0100 Subject: [PATCH 3/4] Added Azure Files Sink Kamelet Signed-off-by: Andrea Cosentino --- docs/modules/ROOT/nav.adoc | 1 + kamelets/azure-storage-files-sink.kamelet.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc index 7f27d8d88..bf0466efa 100644 --- a/docs/modules/ROOT/nav.adoc +++ b/docs/modules/ROOT/nav.adoc @@ -42,6 +42,7 @@ * xref:azure-storage-blob-source.adoc[] * xref:azure-storage-datalake-sink.adoc[] * xref:azure-storage-datalake-source.adoc[] +* xref:azure-storage-files-sink.adoc[] * xref:azure-storage-files-source.adoc[] * xref:azure-storage-queue-sink.adoc[] * xref:azure-storage-queue-source.adoc[] diff --git a/kamelets/azure-storage-files-sink.kamelet.yaml b/kamelets/azure-storage-files-sink.kamelet.yaml index 4aea5802b..f86f13ec7 100644 --- a/kamelets/azure-storage-files-sink.kamelet.yaml +++ b/kamelets/azure-storage-files-sink.kamelet.yaml @@ -37,7 +37,7 @@ spec: In the header, you can set the `file` / `ce-file` property to specify the filename to upload. If you do set property in the header, the Kamelet uses the exchange ID as filename. required: - accountName - - containerName + - shareName type: object properties: accountName: From 5669f21af997855dd3966ac4967375dce2ffc35d Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Mon, 12 Feb 2024 13:57:35 +0100 Subject: [PATCH 4/4] Added Azure Files Sink Kamelet Signed-off-by: Andrea Cosentino --- .../resources/kamelets/azure-storage-files-sink.kamelet.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-files-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-files-sink.kamelet.yaml index 4aea5802b..f86f13ec7 100644 --- a/library/camel-kamelets/src/main/resources/kamelets/azure-storage-files-sink.kamelet.yaml +++ b/library/camel-kamelets/src/main/resources/kamelets/azure-storage-files-sink.kamelet.yaml @@ -37,7 +37,7 @@ spec: In the header, you can set the `file` / `ce-file` property to specify the filename to upload. If you do set property in the header, the Kamelet uses the exchange ID as filename. required: - accountName - - containerName + - shareName type: object properties: accountName: