Skip to content

Commit

Permalink
adding first draft of IntegrationSource doc
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
  • Loading branch information
matzew committed Nov 25, 2024
1 parent 421c8e4 commit 114fe50
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ nav:
- PingSource:
- Creating a PingSource object: eventing/sources/ping-source/README.md
- PingSource reference: eventing/sources/ping-source/reference.md
- IntegrationSource: eventing/sources/integration-source/README.md
- RabbitMQSource: eventing/sources/rabbitmq-source/README.md
- RedisStreamSource:
- About RedisStreamSource: eventing/sources/redis/README.md
Expand Down
133 changes: 133 additions & 0 deletions docs/eventing/sources/integration-source/README.md
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).

0 comments on commit 114fe50

Please sign in to comment.