From a36bf56179a49679c1fb8db1422d2f5c9a21946a Mon Sep 17 00:00:00 2001 From: Christoph Deppisch Date: Wed, 6 Nov 2024 14:12:58 +0100 Subject: [PATCH] Remove the "connector.event" prefix in favor of "eventing" --- README.adoc | 16 +++++++++------- .../src/main/resources/application.properties | 2 +- .../connector/AwsDdbStreamsSourceTest.java | 2 +- .../eventing/connector/AwsS3SinkTest.java | 2 +- .../src/main/resources/application.properties | 2 +- .../eventing/connector/AwsS3SourceTest.java | 2 +- .../connector/ssl/AwsS3SourceSSLTest.java | 2 +- .../eventing/connector/AwsSqsSinkTest.java | 2 +- .../src/main/resources/application.properties | 2 +- .../eventing/connector/AwsSqsSourceTest.java | 2 +- .../knative/eventing/connector/LogSinkTest.java | 2 +- .../src/main/resources/application.properties | 2 +- .../eventing/connector/TimerSourceTest.java | 2 +- .../connector/ssl/TimerSourceSSLTest.java | 2 +- .../src/main/resources/application.properties | 2 +- 15 files changed, 23 insertions(+), 21 deletions(-) diff --git a/README.adoc b/README.adoc index 7c1ccdf..d33a7cb 100644 --- a/README.adoc +++ b/README.adoc @@ -24,8 +24,9 @@ NOTE: The Maven archetype `archetype-source` creates a new IntegrationSource con ---- mvn archetype:generate \ -DarchetypeGroupId=dev.knative.eventing \ - -DarchetypeArtifactId=archetype-source \ - -DarchetypeVersion=1.0-SNAPSHOT + -DarchetypeArtifactId=connector-archetype-source \ + -DarchetypeVersion=1.0-SNAPSHOT \ + -DoutputDirectory=integration-source ---- This command starts the archetype generation in interactive mode. @@ -40,11 +41,12 @@ You can also avoid the interactive mode when specifying all input parameters: ---- mvn archetype:generate \ -DarchetypeGroupId=dev.knative.eventing \ - -DarchetypeArtifactId=archetype-source \ + -DarchetypeArtifactId=connector-archetype-source \ -DarchetypeVersion=1.0-SNAPSHOT \ -DartifactId=aws-s3-source \ -Dkamelet-name=aws-s3 \ - -Dcomponent-name=aws2-s3 + -Dcomponent-name=aws2-s3 \ + -DoutputDirectory=integration-source ---- Each connector requires a set of Camel Quarkus dependencies in the Maven POM. @@ -315,7 +317,7 @@ This means you can overwrite Kamelet properties with the values from the secret Each connector produces/consumes events in CloudEvent data format. The connector uses a set of default values for the CloudEvent attributes: -* _ce-type_: dev.knative.connector.event.{{source-type}} +* _ce-type_: dev.knative.eventing.{{source-type}} * _ce-source_: dev.knative.eventing.{{source-name}} * _ce-subject_: {{source-name}} @@ -358,7 +360,7 @@ spec: broker: default filter: attributes: - type: dev.knative.connector.event.timer + type: dev.knative.eventing.timer subscriber: ref: apiVersion: v1 @@ -366,7 +368,7 @@ spec: name: log-sink ---- -The trigger for example filters the events by its type `ce-type=dev.knative.connector.event.timer`. +The trigger for example filters the events by its type `ce-type=dev.knative.eventing.timer`. == Secure Knative transports diff --git a/aws-ddb-streams-source/src/main/resources/application.properties b/aws-ddb-streams-source/src/main/resources/application.properties index adeb9a4..bcbe30e 100644 --- a/aws-ddb-streams-source/src/main/resources/application.properties +++ b/aws-ddb-streams-source/src/main/resources/application.properties @@ -23,7 +23,7 @@ camel.main.routes-include-pattern=camel/source.yaml # Knative Camel component camel.component.knative.environmentPath=classpath:knative.json -camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.connector.event.aws-ddb-streams}} +camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.eventing.aws-ddb-streams}} camel.component.knative.ceOverride[ce-source]={{kn.connector.ce.override.source:dev.knative.eventing.aws-ddb-streams-source}} camel.component.knative.ceOverride[ce-subject]={{kn.connector.ce.override.subject:aws-ddb-streams-source}} diff --git a/aws-ddb-streams-source/src/test/java/dev/knative/eventing/connector/AwsDdbStreamsSourceTest.java b/aws-ddb-streams-source/src/test/java/dev/knative/eventing/connector/AwsDdbStreamsSourceTest.java index 7158569..fe7e008 100644 --- a/aws-ddb-streams-source/src/test/java/dev/knative/eventing/connector/AwsDdbStreamsSourceTest.java +++ b/aws-ddb-streams-source/src/test/java/dev/knative/eventing/connector/AwsDdbStreamsSourceTest.java @@ -97,7 +97,7 @@ public void shouldProduceEvents() { } """) .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.aws-ddb-streams") + .header("ce-type", "dev.knative.eventing.aws-ddb-streams") .header("ce-source", "dev.knative.eventing.aws-ddb-streams-source") .header("ce-subject", "aws-ddb-streams-source") ); diff --git a/aws-s3-sink/src/test/java/dev/knative/eventing/connector/AwsS3SinkTest.java b/aws-s3-sink/src/test/java/dev/knative/eventing/connector/AwsS3SinkTest.java index da5b151..2ef1bd1 100644 --- a/aws-s3-sink/src/test/java/dev/knative/eventing/connector/AwsS3SinkTest.java +++ b/aws-s3-sink/src/test/java/dev/knative/eventing/connector/AwsS3SinkTest.java @@ -68,7 +68,7 @@ public void shouldConsumeEvents() { .message() .body(s3Data) .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.aws.s3") + .header("ce-type", "dev.knative.eventing.aws.s3") .header("ce-source", "dev.knative.eventing.aws-s3-source") .header("ce-subject", "aws-s3-source") ); diff --git a/aws-s3-source/src/main/resources/application.properties b/aws-s3-source/src/main/resources/application.properties index 193277a..4037ca2 100644 --- a/aws-s3-source/src/main/resources/application.properties +++ b/aws-s3-source/src/main/resources/application.properties @@ -23,7 +23,7 @@ camel.main.routes-include-pattern=camel/source.yaml # Knative Camel component camel.component.knative.environmentPath=classpath:knative.json -camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.connector.event.aws-s3}} +camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.eventing.aws-s3}} camel.component.knative.ceOverride[ce-source]={{kn.connector.ce.override.source:dev.knative.eventing.aws-s3-source}} camel.component.knative.ceOverride[ce-subject]={{kn.connector.ce.override.subject:aws-s3-source}} diff --git a/aws-s3-source/src/test/java/dev/knative/eventing/connector/AwsS3SourceTest.java b/aws-s3-source/src/test/java/dev/knative/eventing/connector/AwsS3SourceTest.java index 949a2d9..625c2d7 100644 --- a/aws-s3-source/src/test/java/dev/knative/eventing/connector/AwsS3SourceTest.java +++ b/aws-s3-source/src/test/java/dev/knative/eventing/connector/AwsS3SourceTest.java @@ -74,7 +74,7 @@ public void shouldProduceEvents() { .message() .body(s3Data) .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.aws-s3") + .header("ce-type", "dev.knative.eventing.aws-s3") .header("ce-source", "dev.knative.eventing.aws-s3-source") .header("ce-subject", "aws-s3-source") ); diff --git a/aws-s3-source/src/test/java/dev/knative/eventing/connector/ssl/AwsS3SourceSSLTest.java b/aws-s3-source/src/test/java/dev/knative/eventing/connector/ssl/AwsS3SourceSSLTest.java index 38f3e12..93d0966 100644 --- a/aws-s3-source/src/test/java/dev/knative/eventing/connector/ssl/AwsS3SourceSSLTest.java +++ b/aws-s3-source/src/test/java/dev/knative/eventing/connector/ssl/AwsS3SourceSSLTest.java @@ -86,7 +86,7 @@ public void shouldProduceSecureEvents() { .message() .body(s3Data) .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.aws-s3") + .header("ce-type", "dev.knative.eventing.aws-s3") .header("ce-source", "dev.knative.eventing.aws-s3-source") .header("ce-subject", "aws-s3-source") ); diff --git a/aws-sqs-sink/src/test/java/dev/knative/eventing/connector/AwsSqsSinkTest.java b/aws-sqs-sink/src/test/java/dev/knative/eventing/connector/AwsSqsSinkTest.java index 4dd2a10..7b17805 100644 --- a/aws-sqs-sink/src/test/java/dev/knative/eventing/connector/AwsSqsSinkTest.java +++ b/aws-sqs-sink/src/test/java/dev/knative/eventing/connector/AwsSqsSinkTest.java @@ -64,7 +64,7 @@ public void shouldConsumeEvents() { .message() .body(sqsData) .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.aws.sqs") + .header("ce-type", "dev.knative.eventing.aws.sqs") .header("ce-source", "dev.knative.eventing.aws-sqs-source") .header("ce-subject", "aws-sqs-source") ); diff --git a/aws-sqs-source/src/main/resources/application.properties b/aws-sqs-source/src/main/resources/application.properties index f473644..703bb8d 100644 --- a/aws-sqs-source/src/main/resources/application.properties +++ b/aws-sqs-source/src/main/resources/application.properties @@ -23,7 +23,7 @@ camel.main.routes-include-pattern=camel/source.yaml # Knative Camel component camel.component.knative.environmentPath=classpath:knative.json -camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.connector.event.aws-sqs}} +camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.eventing.aws-sqs}} camel.component.knative.ceOverride[ce-source]={{kn.connector.ce.override.source:dev.knative.eventing.aws-sqs-source}} camel.component.knative.ceOverride[ce-subject]={{kn.connector.ce.override.subject:aws-sqs-source}} diff --git a/aws-sqs-source/src/test/java/dev/knative/eventing/connector/AwsSqsSourceTest.java b/aws-sqs-source/src/test/java/dev/knative/eventing/connector/AwsSqsSourceTest.java index afc66f3..17154a9 100644 --- a/aws-sqs-source/src/test/java/dev/knative/eventing/connector/AwsSqsSourceTest.java +++ b/aws-sqs-source/src/test/java/dev/knative/eventing/connector/AwsSqsSourceTest.java @@ -65,7 +65,7 @@ public void shouldProduceEvents() { .message() .body(sqsData) .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.aws-sqs") + .header("ce-type", "dev.knative.eventing.aws-sqs") .header("ce-source", "dev.knative.eventing.aws-sqs-source") .header("ce-subject", "aws-sqs-source") ); diff --git a/log-sink/src/test/java/dev/knative/eventing/connector/LogSinkTest.java b/log-sink/src/test/java/dev/knative/eventing/connector/LogSinkTest.java index 9df9700..f174663 100644 --- a/log-sink/src/test/java/dev/knative/eventing/connector/LogSinkTest.java +++ b/log-sink/src/test/java/dev/knative/eventing/connector/LogSinkTest.java @@ -50,7 +50,7 @@ public void shouldConsumeEvents() { .message() .body("Timer source event!") .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.timer") + .header("ce-type", "dev.knative.eventing.timer") .header("ce-source", "dev.knative.eventing.timer-source") .header("ce-subject", "timer-source") ); diff --git a/timer-source/src/main/resources/application.properties b/timer-source/src/main/resources/application.properties index bd9efa4..2caeefc 100644 --- a/timer-source/src/main/resources/application.properties +++ b/timer-source/src/main/resources/application.properties @@ -23,7 +23,7 @@ camel.main.routes-include-pattern=camel/source.yaml # Knative Camel component camel.component.knative.environmentPath=classpath:knative.json -camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.connector.event.timer}} +camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.eventing.timer}} camel.component.knative.ceOverride[ce-source]={{kn.connector.ce.override.source:dev.knative.eventing.timer-source}} camel.component.knative.ceOverride[ce-subject]={{kn.connector.ce.override.subject:timer-source}} diff --git a/timer-source/src/test/java/dev/knative/eventing/connector/TimerSourceTest.java b/timer-source/src/test/java/dev/knative/eventing/connector/TimerSourceTest.java index b9359d3..b727d87 100644 --- a/timer-source/src/test/java/dev/knative/eventing/connector/TimerSourceTest.java +++ b/timer-source/src/test/java/dev/knative/eventing/connector/TimerSourceTest.java @@ -51,7 +51,7 @@ public void shouldProduceEvents() { .message() .body("Timer source event!") .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.timer") + .header("ce-type", "dev.knative.eventing.timer") .header("ce-source", "dev.knative.eventing.timer-source") .header("ce-subject", "timer-source") ); diff --git a/timer-source/src/test/java/dev/knative/eventing/connector/ssl/TimerSourceSSLTest.java b/timer-source/src/test/java/dev/knative/eventing/connector/ssl/TimerSourceSSLTest.java index 9fe9bac..8f88648 100644 --- a/timer-source/src/test/java/dev/knative/eventing/connector/ssl/TimerSourceSSLTest.java +++ b/timer-source/src/test/java/dev/knative/eventing/connector/ssl/TimerSourceSSLTest.java @@ -70,7 +70,7 @@ public void shouldProduceEvents() { .message() .body(message) .header("ce-id", "@matches([0-9A-Z]{15}-[0-9]{16})@") - .header("ce-type", "dev.knative.connector.event.timer") + .header("ce-type", "dev.knative.eventing.timer") .header("ce-source", "dev.knative.eventing.timer-source") .header("ce-subject", "timer-source") ); diff --git a/tools/archetype-source/src/main/resources/archetype-resources/src/main/resources/application.properties b/tools/archetype-source/src/main/resources/archetype-resources/src/main/resources/application.properties index 904f132..f4611b1 100644 --- a/tools/archetype-source/src/main/resources/archetype-resources/src/main/resources/application.properties +++ b/tools/archetype-source/src/main/resources/archetype-resources/src/main/resources/application.properties @@ -23,7 +23,7 @@ camel.main.routes-include-pattern=camel/source.yaml # Knative Camel component camel.component.knative.environmentPath=classpath:knative.json -camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.connector.event.${kamelet-name}}} +camel.component.knative.ceOverride[ce-type]={{kn.connector.ce.override.type:dev.knative.eventing.${kamelet-name}}} camel.component.knative.ceOverride[ce-source]={{kn.connector.ce.override.source:dev.knative.eventing.${kamelet-name}-source}} camel.component.knative.ceOverride[ce-subject]={{kn.connector.ce.override.subject:${kamelet-name}-source}}