Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS SQS Kamelets: Introduce optional overrideEndpoint and uriEndpointOverride for testing purpose #838

Merged
merged 8 commits into from
Mar 17, 2022
16 changes: 15 additions & 1 deletion kamelets/aws-sqs-batch-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ spec:
title: AWS Host
description: The hostname of the Amazon AWS cloud.
type: string
default: amazonaws.com
protocol:
title: Protocol
description: The underlying protocol used to communicate with SQS
Expand All @@ -95,6 +96,17 @@ spec:
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
uriEndpointOverride:
title: Overwritte Endpoint URI
description: Set the overriding endpoint URI. This option needs to be used in combination with overrideEndpoint option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Set the need for overiding the endpoint URI. This option needs to be used in combination with uriEndpointOverride setting.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-sqs"
Expand All @@ -114,4 +126,6 @@ spec:
operation: "sendBatchMessage"
amazonAWSHost: "{{?amazonAWSHost}}"
protocol: "{{?protocol}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
18 changes: 17 additions & 1 deletion kamelets/aws-sqs-fifo-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ spec:
title: AWS Host
description: The hostname of the Amazon AWS cloud.
type: string
default: amazonaws.com
protocol:
title: Protocol
description: The underlying protocol used to communicate with SQS
Expand All @@ -97,7 +98,18 @@ spec:
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
default: false
uriEndpointOverride:
title: Overwritte Endpoint URI
description: Set the overriding endpoint URI. This option needs to be used in combination with overrideEndpoint option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Set the need for overiding the endpoint URI. This option needs to be used in combination with uriEndpointOverride setting.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-sqs"
- "camel:core"
Expand Down Expand Up @@ -140,6 +152,8 @@ spec:
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
messageGroupIdStrategy: "usePropertyValue"
messageDeduplicationIdStrategy: "useContentBasedDeduplication"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
otherwise:
steps:
- to:
Expand All @@ -154,3 +168,5 @@ spec:
messageDeduplicationIdStrategy: "useExchangeId"
amazonAWSHost: "{{?amazonAWSHost}}"
protocol: "{{?protocol}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
16 changes: 15 additions & 1 deletion kamelets/aws-sqs-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ spec:
title: AWS Host
description: The hostname of the Amazon AWS cloud.
type: string
default: amazonaws.com
protocol:
title: Protocol
description: The underlying protocol used to communicate with SQS
Expand All @@ -89,6 +90,17 @@ spec:
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
uriEndpointOverride:
title: Overwritte Endpoint URI
description: Set the overriding endpoint URI. This option needs to be used in combination with overrideEndpoint option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Set the need for overiding the endpoint URI. This option needs to be used in combination with uriEndpointOverride setting.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-sqs"
Expand All @@ -106,4 +118,6 @@ spec:
region: "{{region}}"
amazonAWSHost: "{{?amazonAWSHost}}"
protocol: "{{?protocol}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
14 changes: 14 additions & 0 deletions kamelets/aws-sqs-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ spec:
title: AWS Host
description: The hostname of the Amazon AWS cloud.
type: string
default: amazonaws.com
protocol:
title: Protocol
description: The underlying protocol used to communicate with SQS
Expand All @@ -112,6 +113,17 @@ spec:
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
uriEndpointOverride:
title: Overwritte Endpoint URI
description: Set the overriding endpoint URI. This option needs to be used in combination with overrideEndpoint option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Set the need for overiding the endpoint URI. This option needs to be used in combination with uriEndpointOverride setting.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-sqs"
- "camel:kamelet"
Expand All @@ -127,5 +139,7 @@ spec:
amazonAWSHost: "{{?amazonAWSHost}}"
protocol: "{{?protocol}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
steps:
- to: "kamelet:sink"
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void testGetKamelets() throws Exception {
@Test
void testGetKameletsDefinition() throws Exception {
JSONSchemaProps props = catalog.getKameletDefinition("aws-sqs-source");
assertEquals(10, props.getProperties().keySet().size());
assertEquals(12, props.getProperties().keySet().size());
assertTrue(props.getProperties().keySet().contains("queueNameOrArn"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ spec:
title: AWS Host
description: The hostname of the Amazon AWS cloud.
type: string
default: amazonaws.com
protocol:
title: Protocol
description: The underlying protocol used to communicate with SQS
Expand All @@ -95,6 +96,17 @@ spec:
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
uriEndpointOverride:
title: Overwritte Endpoint URI
description: Set the overriding endpoint URI. This option needs to be used in combination with overrideEndpoint option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Set the need for overiding the endpoint URI. This option needs to be used in combination with uriEndpointOverride setting.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-sqs"
Expand All @@ -114,4 +126,6 @@ spec:
operation: "sendBatchMessage"
amazonAWSHost: "{{?amazonAWSHost}}"
protocol: "{{?protocol}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ spec:
title: AWS Host
description: The hostname of the Amazon AWS cloud.
type: string
default: amazonaws.com
protocol:
title: Protocol
description: The underlying protocol used to communicate with SQS
Expand All @@ -97,7 +98,18 @@ spec:
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
default: false
uriEndpointOverride:
title: Overwritte Endpoint URI
description: Set the overriding endpoint URI. This option needs to be used in combination with overrideEndpoint option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Set the need for overiding the endpoint URI. This option needs to be used in combination with uriEndpointOverride setting.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-sqs"
- "camel:core"
Expand Down Expand Up @@ -140,6 +152,8 @@ spec:
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
messageGroupIdStrategy: "usePropertyValue"
messageDeduplicationIdStrategy: "useContentBasedDeduplication"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
otherwise:
steps:
- to:
Expand All @@ -154,3 +168,5 @@ spec:
messageDeduplicationIdStrategy: "useExchangeId"
amazonAWSHost: "{{?amazonAWSHost}}"
protocol: "{{?protocol}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ spec:
title: AWS Host
description: The hostname of the Amazon AWS cloud.
type: string
default: amazonaws.com
protocol:
title: Protocol
description: The underlying protocol used to communicate with SQS
Expand All @@ -89,6 +90,17 @@ spec:
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
uriEndpointOverride:
title: Overwritte Endpoint URI
description: Set the overriding endpoint URI. This option needs to be used in combination with overrideEndpoint option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Set the need for overiding the endpoint URI. This option needs to be used in combination with uriEndpointOverride setting.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-sqs"
Expand All @@ -106,4 +118,6 @@ spec:
region: "{{region}}"
amazonAWSHost: "{{?amazonAWSHost}}"
protocol: "{{?protocol}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ spec:
title: AWS Host
description: The hostname of the Amazon AWS cloud.
type: string
default: amazonaws.com
protocol:
title: Protocol
description: The underlying protocol used to communicate with SQS
Expand All @@ -112,6 +113,17 @@ spec:
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
uriEndpointOverride:
title: Overwritte Endpoint URI
description: Set the overriding endpoint URI. This option needs to be used in combination with overrideEndpoint option.
type: string
overrideEndpoint:
title: Endpoint Overwrite
description: Set the need for overiding the endpoint URI. This option needs to be used in combination with uriEndpointOverride setting.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
dependencies:
- "camel:aws2-sqs"
- "camel:kamelet"
Expand All @@ -127,5 +139,7 @@ spec:
amazonAWSHost: "{{?amazonAWSHost}}"
protocol: "{{?protocol}}"
useDefaultCredentialsProvider: "{{useDefaultCredentialsProvider}}"
uriEndpointOverride: "{{?uriEndpointOverride}}"
overrideEndpoint: "{{overrideEndpoint}}"
steps:
- to: "kamelet:sink"