-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding first draft of IntegrationSource doc
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
- Loading branch information
Showing
2 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# Knative Source for Apache Camel Kamelet integrations | ||
|
||
![stage](https://img.shields.io/badge/Stage-alpah-red?style=flat-square) | ||
![version](https://img.shields.io/badge/API_Version-v1alpha1-red?style=flat-square) | ||
|
||
|
||
The `IntegrationSource` is a Knative Eventing custom resource supporting selected _Kamelets_ from the Apache Camel project. Kamelets allow users to connect to 3rd party system for improved connectivity, they can act as "sources" or as "sinks". Therefore the `IntegrationSource` allows to consume data from external systems and forward them into Knative Eventing. The source is part of the Knative Eventing core installation. | ||
|
||
## Amazon Web Services | ||
|
||
The `IntegrationSource` supports a couple of AWS services through its `aws` property, such as `s3`, `sqsq` or `ddbStreams`. | ||
|
||
### Amazon credentials | ||
|
||
For connecting to AWS the `IntegrationSource` uses Kubernetes `Secret`, present in the namespace of the resource. The `Secret` can be created like: | ||
|
||
```bash | ||
kubectl -n <namespace> create secret generic my-secret --from-literal=aws.accessKey=<accessKey> --from-literal=aws.secretKey=<secretKey> | ||
``` | ||
|
||
### AWS S3 Source | ||
|
||
Below is an `IntegrationSource` to receive data from an Amazon S3 Bucket. | ||
|
||
```yaml | ||
apiVersion: sources.knative.dev/v1alpha1 | ||
kind: IntegrationSource | ||
metadata: | ||
name: integration-source-aws-s3 | ||
namespace: knative-samples | ||
spec: | ||
aws: | ||
s3: | ||
arn: "arn:aws:s3:::my-bucket" | ||
region: "eu-north-1" | ||
auth: | ||
secret: | ||
ref: | ||
name: "my-secret" | ||
sink: | ||
ref: | ||
apiVersion: eventing.knative.dev/v1 | ||
kind: Broker | ||
name: default | ||
``` | ||
Inside of the `aws.s3` object we define the name of the bucket (or _arn_) and its region. The credentials for the AWS service are referenced from the `my-secret` Kubernetes `Secret` | ||
|
||
More details about the Apache Camel Kamelet [aws-s3-source](https://camel.apache.org/camel-kamelets/latest/aws-s3-source.html). | ||
|
||
### AWS SQS Source | ||
|
||
Below is an `IntegrationSource` to receive data from AWS SQS. | ||
|
||
```yaml | ||
apiVersion: sources.knative.dev/v1alpha1 | ||
kind: IntegrationSource | ||
metadata: | ||
name: integration-source-aws-sqs | ||
namespace: knative-samples | ||
spec: | ||
aws: | ||
sqs: | ||
arn: "arn:aws:s3:::my-queue" | ||
region: "eu-north-1" | ||
auth: | ||
secret: | ||
ref: | ||
name: "my-secret" | ||
sink: | ||
ref: | ||
apiVersion: eventing.knative.dev/v1 | ||
kind: Broker | ||
name: default | ||
``` | ||
Inside of the `aws.sqs` object we define the name of the queue (or _arn_) and its region. The credentials for the AWS service are referenced from the `my-secret` Kubernetes `Secret` | ||
|
||
More details about the Apache Camel Kamelet [aws-sqs-source](https://camel.apache.org/camel-kamelets/latest/aws-sqs-source.html). | ||
|
||
### AWS DynamoDB Streams | ||
|
||
Below is an `IntegrationSource` to receive events from Amazon DynamoDB Streams. | ||
|
||
```yaml | ||
apiVersion: sources.knative.dev/v1alpha1 | ||
kind: IntegrationSource | ||
metadata: | ||
name: integration-source-aws-ddb | ||
namespace: knative-samples | ||
spec: | ||
aws: | ||
ddbStreams: | ||
table: "my-table" | ||
region: "eu-north-1" | ||
auth: | ||
secret: | ||
ref: | ||
name: "my-secret" | ||
sink: | ||
ref: | ||
apiVersion: eventing.knative.dev/v1 | ||
kind: Broker | ||
name: default | ||
``` | ||
|
||
Inside of the `aws.ddbStreams` object we define the name of the table and its region. The credentials for the AWS service are referenced from the `my-secret` Kubernetes `Secret` | ||
|
||
More details about the Apache Camel Kamelet [aws-ddb-streams-source](https://camel.apache.org/camel-kamelets/latest/aws-ddb-streams-source.html). | ||
|
||
## Timer Source | ||
|
||
Produces periodic messages with a custom payload. | ||
|
||
```yaml | ||
apiVersion: sources.knative.dev/v1alpha1 | ||
kind: IntegrationSource | ||
metadata: | ||
name: integration-source-timer | ||
namespace: knative-samples | ||
spec: | ||
timer: | ||
period: 2000 | ||
message: "Hello, Eventing Core" | ||
sink: | ||
ref: | ||
apiVersion: eventing.knative.dev/v1 | ||
kind: Broker | ||
name: default | ||
``` | ||
|
||
Inside of the `timer` object we define the `period` and the message that is send to the referenced `sink`. | ||
|
||
More details about the Apache Camel Kamelet [timer-source](https://camel.apache.org/camel-kamelets/latest/timer-source.html). |