Skip to content

Commit

Permalink
Azure Storage Blob Kamelets: Expose the credentialsType parameter wit…
Browse files Browse the repository at this point in the history
…h SHARED_ACCOUNT_KEY as default

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
  • Loading branch information
oscerd committed Jun 28, 2023
1 parent e1868a4 commit d823d0b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 16 deletions.
11 changes: 8 additions & 3 deletions kamelets/azure-storage-blob-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ spec:
required:
- accountName
- containerName
- accessKey
type: object
properties:
accountName:
Expand All @@ -59,6 +58,12 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
credentialType:
title: Credential Type
description: Determines the credential strategy to adopt.
type: string
enum: ["SHARED_ACCOUNT_KEY", "AZURE_IDENTITY"]
default: "SHARED_ACCOUNT_KEY"
dependencies:
- "camel:core"
- "camel:azure-storage-blob"
Expand Down Expand Up @@ -87,6 +92,6 @@ spec:
- to:
uri: "azure-storage-blob://{{accountName}}/{{containerName}}"
parameters:
accessKey: "{{accessKey}}"
accessKey: "{{?accessKey}}"
operation: "uploadBlockBlob"
credentialType: "SHARED_ACCOUNT_KEY"
credentialType: "{{credentialType}}"
15 changes: 10 additions & 5 deletions kamelets/azure-storage-blob-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ spec:
required:
- accountName
- containerName
- accessKey
type: object
properties:
accountName:
Expand Down Expand Up @@ -71,6 +70,12 @@ spec:
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
credentialType:
title: Credential Type
description: Determines the credential strategy to adopt.
type: string
enum: ["SHARED_ACCOUNT_KEY", "AZURE_IDENTITY"]
default: "SHARED_ACCOUNT_KEY"
dependencies:
- "camel:azure-storage-blob"
- "camel:kamelet"
Expand All @@ -90,8 +95,8 @@ spec:
from:
uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
parameters:
accessKey: "{{accessKey}}"
credentialType: "SHARED_ACCOUNT_KEY"
accessKey: "{{?accessKey}}"
credentialType: "{{credentialType}}"
delay: "{{delay}}"
steps:
- process:
Expand All @@ -106,6 +111,6 @@ spec:
uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
parameters:
operation: "deleteBlob"
accessKey: "{{accessKey}}"
credentialType: "SHARED_ACCOUNT_KEY"
accessKey: "{{?accessKey}}"
credentialType: "{{credentialType}}"

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ spec:
required:
- accountName
- containerName
- accessKey
type: object
properties:
accountName:
Expand All @@ -59,6 +58,12 @@ spec:
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
credentialType:
title: Credential Type
description: Determines the credential strategy to adopt.
type: string
enum: ["SHARED_ACCOUNT_KEY", "AZURE_IDENTITY"]
default: "SHARED_ACCOUNT_KEY"
dependencies:
- "camel:core"
- "camel:azure-storage-blob"
Expand Down Expand Up @@ -87,6 +92,6 @@ spec:
- to:
uri: "azure-storage-blob://{{accountName}}/{{containerName}}"
parameters:
accessKey: "{{accessKey}}"
accessKey: "{{?accessKey}}"
operation: "uploadBlockBlob"
credentialType: "SHARED_ACCOUNT_KEY"
credentialType: "{{credentialType}}"
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ spec:
required:
- accountName
- containerName
- accessKey
type: object
properties:
accountName:
Expand Down Expand Up @@ -71,6 +70,12 @@ spec:
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
credentialType:
title: Credential Type
description: Determines the credential strategy to adopt.
type: string
enum: ["SHARED_ACCOUNT_KEY", "AZURE_IDENTITY"]
default: "SHARED_ACCOUNT_KEY"
dependencies:
- "camel:azure-storage-blob"
- "camel:kamelet"
Expand All @@ -90,8 +95,8 @@ spec:
from:
uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
parameters:
accessKey: "{{accessKey}}"
credentialType: "SHARED_ACCOUNT_KEY"
accessKey: "{{?accessKey}}"
credentialType: "{{credentialType}}"
delay: "{{delay}}"
steps:
- process:
Expand All @@ -106,6 +111,6 @@ spec:
uri: "azure-storage-blob:{{accountName}}/{{containerName}}"
parameters:
operation: "deleteBlob"
accessKey: "{{accessKey}}"
credentialType: "SHARED_ACCOUNT_KEY"
accessKey: "{{?accessKey}}"
credentialType: "{{credentialType}}"

0 comments on commit d823d0b

Please sign in to comment.