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

Fix #513: use valid CloudEvents attributes #524

Merged
merged 1 commit into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 18 additions & 18 deletions aws-cloudwatch-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ spec:

There are several properties you can set in the headers, such as:

`metric-name` / `ce-metric-name` for the metric name.
`metric-value` / `ce-metric-value` for the metric value.
`metric-unit` / `ce-metric-unit` for the metric unit.
`metric-timestamp` / `ce-metric-timestamp` for the metric timestamp.
`metric-dimension-name` / `ce-metric-dimension-name` for the dimension name.
`metric-dimension-value` / `ce-metric-dimension-value` for the dimension value.
`metric-name` / `ce-metricname` for the metric name.
`metric-value` / `ce-metricvalue` for the metric value.
`metric-unit` / `ce-metricunit` for the metric unit.
`metric-timestamp` / `ce-metrictimestamp` for the metric timestamp.
`metric-dimension-name` / `ce-metricdimensionname` for the dimension name.
`metric-dimension-value` / `ce-metricdimensionvalue` for the dimension value.
required:
- cw_namespace
- accessKey
Expand Down Expand Up @@ -68,71 +68,71 @@ spec:
- set-header:
name: CamelAwsCwMetricName
simple: "${header[metric-name]}"
- simple: "${header[ce-metric-name]}"
- simple: "${header[ce-metricname]}"
steps:
- set-header:
name: CamelAwsCwMetricName
simple: "${header[ce-metric-name]}"
simple: "${header[ce-metricname]}"
- choice:
when:
- simple: "${header[metric-value]}"
steps:
- set-header:
name: CamelAwsCwMetricValue
simple: "${header[metric-value]}"
- simple: "${header[ce-metric-value]}"
- simple: "${header[ce-metricvalue]}"
steps:
- set-header:
name: CamelAwsCwMetricValue
simple: "${header[ce-metric-value]}"
simple: "${header[ce-metricvalue]}"
- choice:
when:
- simple: "${header[metric-unit]}"
steps:
- set-header:
name: CamelAwsCwMetricUnit
simple: "${header[metric-unit]}"
- simple: "${header[ce-metric-unit]}"
- simple: "${header[ce-metricunit]}"
steps:
- set-header:
name: CamelAwsCwMetricUnit
simple: "${header[ce-metric-unit]}"
simple: "${header[ce-metricunit]}"
- choice:
when:
- simple: "${header[metric-timestamp]}"
steps:
- set-header:
name: CamelAwsCwMetricTimestamp
simple: "${header[metric-timestamp]}"
- simple: "${header[ce-metric-timestamp]}"
- simple: "${header[ce-metrictimestamp]}"
steps:
- set-header:
name: CamelAwsCwMetricTimestamp
simple: "${header[ce-metric-timestamp]}"
simple: "${header[ce-metrictimestamp]}"
- choice:
when:
- simple: "${header[metric-dimension-name]}"
steps:
- set-header:
name: CamelAwsCwMetricDimensionName
simple: "${header[metric-dimension-name]}"
- simple: "${header[ce-metric-dimension-name]}"
- simple: "${header[ce-metricdimensionname]}"
steps:
- set-header:
name: CamelAwsCwMetricDimensionName
simple: "${header[ce-metric-dimension-name]}"
simple: "${header[ce-metricdimensionname]}"
- choice:
when:
- simple: "${header[metric-dimension-value]}"
steps:
- set-header:
name: CamelAwsCwMetricDimensionValue
simple: "${header[metric-dimension-value]}"
- simple: "${header[ce-metric-dimension-value]}"
- simple: "${header[ce-metricdimensionvalue]}"
steps:
- set-header:
name: CamelAwsCwMetricDimensionValue
simple: "${header[ce-metric-dimension-value]}"
simple: "${header[ce-metricdimensionvalue]}"
- to:
uri: "aws2-cw:{{cw_namespace}}"
parameters:
Expand Down
6 changes: 3 additions & 3 deletions aws-ec2-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:

The Kamelet expects the following headers to be set:

- `instanceIds` / `ce-instanceIds`: as a comma separated list of EC2 instance ids.
- `instanceIds` / `ce-instanceids`: as a comma separated list of EC2 instance ids.
required:
- accessKey
- secretKey
Expand Down Expand Up @@ -58,11 +58,11 @@ spec:
- set-header:
name: CamelAwsEC2InstancesIds
simple: "${header[instanceIds]}"
- simple: "${header[ce-instanceIds]}"
- simple: "${header[ce-instanceids]}"
steps:
- set-header:
name: CamelAwsEC2InstancesIds
simple: "${header[ce-instanceIds]}"
simple: "${header[ce-instanceids]}"
- to:
uri: "aws2-ec2:ec2-route"
parameters:
Expand Down
6 changes: 3 additions & 3 deletions aws-kinesis-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:

The Kamelet is also able to recognize the following header:

- `sequence-number` / `ce-sequence-number`: to set the Sequence number
- `sequence-number` / `ce-sequencenumber`: to set the Sequence number

This header is optional.
required:
Expand Down Expand Up @@ -88,11 +88,11 @@ spec:
- set-header:
name: CamelAwsKinesisSequenceNumber
simple: "${header[sequence-number]}"
- simple: "${header[ce-sequence-number]}"
- simple: "${header[ce-sequencenumber]}"
steps:
- set-header:
name: CamelAwsKinesisSequenceNumber
simple: "${header[ce-sequence-number]}"
simple: "${header[ce-sequencenumber]}"
- to:
uri: "aws2-kinesis:{{stream}}"
parameters:
Expand Down
12 changes: 6 additions & 6 deletions caffeine-action.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ spec:

The Kamelet expects the following headers to be set:

- `caffeine-key` / `ce-caffeine-key`: as the cache key used in the operation
- `caffeine-key` / `ce-caffeinekey`: as the cache key used in the operation

- `caffeine-operation` / `ce-caffeine-operation`: as the operation to perform. It can be PUT, GET, INVALIDATE and CLEANUP.
- `caffeine-operation` / `ce-caffeineoperation`: as the operation to perform. It can be PUT, GET, INVALIDATE and CLEANUP.

If the caffeine-key header won't be set the exchange ID will be used as key.

Expand Down Expand Up @@ -48,11 +48,11 @@ spec:
- set-header:
name: CamelCaffeineKey
simple: "${header[caffeine-key]}"
- simple: "${header[ce-caffeine-key]}"
- simple: "${header[ce-caffeinekey]}"
steps:
- set-header:
name: CamelCaffeineKey
simple: "${header[ce-caffeine-key]}"
simple: "${header[ce-caffeinekey]}"
otherwise:
steps:
- set-header:
Expand All @@ -65,11 +65,11 @@ spec:
- set-header:
name: CamelCaffeineAction
simple: "${header[caffeine-operation]}"
- simple: "${header[ce-caffeine-operation]}"
- simple: "${header[ce-caffeineoperation]}"
steps:
- set-header:
name: CamelCaffeineAction
simple: "${header[ce-caffeine-operation]}"
simple: "${header[ce-caffeineoperation]}"
otherwise:
steps:
- set-header:
Expand Down
12 changes: 6 additions & 6 deletions dns-dig-action.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ spec:

The Kamelet expects the following headers to be set:

- `domain-name` / `ce-domain-name`: as the domain for which we are querying the DNS
- `domain-name` / `ce-domainname`: as the domain for which we are querying the DNS

- `dns-type` / `ce-dns-type`: as the DNS type
- `dns-type` / `ce-dnstype`: as the DNS type

If the domain-name header won't be set the body will be used as domain name.

Expand All @@ -40,11 +40,11 @@ spec:
- set-header:
name: dns.name
simple: "${header[domain-name]}"
- simple: "${header[ce-domain-name]}"
- simple: "${header[ce-domainname]}"
steps:
- set-header:
name: dns.name
simple: "${header[ce-domain-name]}"
simple: "${header[ce-domainname]}"
otherwise:
steps:
- set-header:
Expand All @@ -57,11 +57,11 @@ spec:
- set-header:
name: dns.type
simple: "${header[dns-type]}"
- simple: "${header[ce-dns-type]}"
- simple: "${header[ce-dnstype]}"
steps:
- set-header:
name: dns.type
simple: "${header[ce-dns-type]}"
simple: "${header[ce-dnstype]}"
otherwise:
steps:
- set-header:
Expand Down
6 changes: 3 additions & 3 deletions dns-lookup-action.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:

The Kamelet expects the following headers to be set:

- `domain-name` / `ce-domain-name`: as the domain for which we are looking up
- `domain-name` / `ce-domainname`: as the domain for which we are looking up

If the domain-name header won't be set the body will be used as domain name.
type: object
Expand All @@ -40,11 +40,11 @@ spec:
- set-header:
name: dns.domain
simple: "${header[domain-name]}"
- simple: "${header[ce-domain-name]}"
- simple: "${header[ce-domainname]}"
steps:
- set-header:
name: dns.domain
simple: "${header[ce-domain-name]}"
simple: "${header[ce-domainname]}"
otherwise:
steps:
- set-header:
Expand Down
12 changes: 6 additions & 6 deletions docs/modules/ROOT/pages/aws-cloudwatch-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Send messages to AWS CloudWatch metrics.

There are several properties you can set in the headers, such as:

`metric-name` / `ce-metric-name` for the metric name.
`metric-value` / `ce-metric-value` for the metric value.
`metric-unit` / `ce-metric-unit` for the metric unit.
`metric-timestamp` / `ce-metric-timestamp` for the metric timestamp.
`metric-dimension-name` / `ce-metric-dimension-name` for the dimension name.
`metric-dimension-value` / `ce-metric-dimension-value` for the dimension value.
`metric-name` / `ce-metricname` for the metric name.
`metric-value` / `ce-metricvalue` for the metric value.
`metric-unit` / `ce-metricunit` for the metric unit.
`metric-timestamp` / `ce-metrictimestamp` for the metric timestamp.
`metric-dimension-name` / `ce-metricdimensionname` for the dimension name.
`metric-dimension-value` / `ce-metricdimensionvalue` for the dimension value.

== Configuration Options

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/aws-ec2-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Check the status of EC2 instances

The Kamelet expects the following headers to be set:

- `instanceIds` / `ce-instanceIds`: as a comma separated list of EC2 instance ids.
- `instanceIds` / `ce-instanceids`: as a comma separated list of EC2 instance ids.

== Configuration Options

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/aws-kinesis-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If the header won't be set the exchange ID will be used.

The Kamelet is also able to recognize the following header:

- `sequence-number` / `ce-sequence-number`: to set the Sequence number
- `sequence-number` / `ce-sequencenumber`: to set the Sequence number

This header is optional.

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/caffeine-action.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Perform operations on a caffeine cache

The Kamelet expects the following headers to be set:

- `caffeine-key` / `ce-caffeine-key`: as the cache key used in the operation
- `caffeine-key` / `ce-caffeinekey`: as the cache key used in the operation

- `caffeine-operation` / `ce-caffeine-operation`: as the operation to perform. It can be PUT, GET, INVALIDATE and CLEANUP.
- `caffeine-operation` / `ce-caffeineoperation`: as the operation to perform. It can be PUT, GET, INVALIDATE and CLEANUP.

If the caffeine-key header won't be set the exchange ID will be used as key.

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/dns-dig-action.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Query a DNS through Dig

The Kamelet expects the following headers to be set:

- `domain-name` / `ce-domain-name`: as the domain for which we are querying the DNS
- `domain-name` / `ce-domainname`: as the domain for which we are querying the DNS

- `dns-type` / `ce-dns-type`: as the DNS type
- `dns-type` / `ce-dnstype`: as the DNS type

If the domain-name header won't be set the body will be used as domain name.

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/dns-lookup-action.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Lookup for a domain

The Kamelet expects the following headers to be set:

- `domain-name` / `ce-domain-name`: as the domain for which we are looking up
- `domain-name` / `ce-domainname`: as the domain for which we are looking up

If the domain-name header won't be set the body will be used as domain name.

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/elasticsearch-index-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ This sink stores documents into ElasticSearch.

Input data must have JSON format according to the index used.

- `indexId` / `ce-indexId`: as the index ID for Elasticsearch
- `indexId` / `ce-indexid`: as the index ID for Elasticsearch

If the header won't be set the exchange ID will be used as index.

- `indexName` / `ce-indexName`: as the index Name for Elasticsearch
- `indexName` / `ce-indexname`: as the index Name for Elasticsearch

If the header won't be set the exchange ID will be used as index name.

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/kafka-not-secured-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Kamelet is able to understand the following headers to be set:

- `key` / `ce-key`: as message key

- `partition-key` / `ce-partition-key`: as message partition key
- `partition-key` / `ce-partitionkey`: as message partition key

Both the headers are optional.

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/kafka-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Kamelet is able to understand the following headers to be set:

- `key` / `ce-key`: as message key

- `partition-key` / `ce-partition-key`: as message partition key
- `partition-key` / `ce-partitionkey`: as message partition key

Both the headers are optional.

Expand Down
10 changes: 10 additions & 0 deletions docs/modules/ROOT/pages/mail-imap-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@

Receive unread emails from an IMAP mail server, marking them as read once they are received.

The Kamelet generates the following headers:

- `subject` / `ce-subject`: the subject of the incoming mail

- `from` / `ce-from`: the `from` field of the incoming mail

- `to` / `ce-to`: the `to` field of the incoming mail

- `cc` / `ce-cc`: the `cc` field of the incoming mail

== Configuration Options

The following table summarizes the configuration options available for the `mail-imap-source` Kamelet:
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/mongodb-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This Kamelet expects a JSON as body.

Properties you can as headers:

`db-upsert` / `ce-db-upsert` If the database should create the element if it does not exist. Boolean value.
`db-upsert` / `ce-dbupsert` If the database should create the element if it does not exist. Boolean value.

== Configuration Options

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/telegram-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This sink supports the following message types:
This following message headers are also supported:

- `text` / `ce-text`: when sending an image, the image caption
- `chat-id` / `ce-chat-id`: to override the default chat where messages are sent to
- `chat-id` / `ce-chatid`: to override the default chat where messages are sent to

== Configuration Options

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/telegram-source.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To create a bot, contact the @botfather account using the Telegram app.

The source attaches the following headers to the messages:

- `chat-id` / `ce-chat-id`: the ID of the chat where the message comes from
- `chat-id` / `ce-chatid`: the ID of the chat where the message comes from

== Configuration Options

Expand Down