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

Adding first draft of IntegrationSource doc #6156

Merged
merged 1 commit into from
Nov 26, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions config/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,12 @@ nav:
- PingSource:
- Creating a PingSource object: eventing/sources/ping-source/README.md
- PingSource reference: eventing/sources/ping-source/reference.md
- IntegrationSource:
- About IntegrationSource: eventing/sources/integration-source/README.md
- AWS DDB Streams: eventing/sources/integration-source/aws_ddbstreams.md
- AWS S3: eventing/sources/integration-source/aws_s3.md
- AWS SQS: eventing/sources/integration-source/aws_sqs.md
- Generic Timer: eventing/sources/integration-source/timer.md
- RabbitMQSource: eventing/sources/rabbitmq-source/README.md
- RedisStreamSource:
- About RedisStreamSource: eventing/sources/redis/README.md
Expand Down
13 changes: 13 additions & 0 deletions docs/eventing/sources/integration-source/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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_](https://camel.apache.org/camel-k/latest/kamelets/kamelets.html) from the [Apache Camel](https://camel.apache.org/) 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 integration source is part of the Knative Eventing core installation.

## Supported Kamelet sources

* [AWS DDB Streams](./aws_ddbstreams.md)
* [AWS S3](./aws_s3.md)
* [AWS SQS](./aws_sqs.md)
* [Generic timer](./timer.md)
41 changes: 41 additions & 0 deletions docs/eventing/sources/integration-source/aws_ddbstreams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# AWS DynamoDB Streams

The `IntegrationSource` supports the Amazon Web Services (AWS) DynamoDB Streams service, through its `aws.ddbStreams` property.

## 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 DynamoDB Streams Example

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).
41 changes: 41 additions & 0 deletions docs/eventing/sources/integration-source/aws_s3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# AWS S3 Source

The `IntegrationSource` supports the Amazon Web Services (AWS) S3 service, through its `aws.s3` property.

## 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 Example

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).
40 changes: 40 additions & 0 deletions docs/eventing/sources/integration-source/aws_sqs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# AWS Simple Queue Service Source

The `IntegrationSource` supports the Amazon Web Services (AWS) Simple Queue Service (SQS) service, through its `aws.sqs` property.

## 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 SQS Source Example

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).
28 changes: 28 additions & 0 deletions docs/eventing/sources/integration-source/timer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Timer Source

The `IntegrationSource` supports the _Timer Kamelet_ for producing periodic messages with a custom payload, through its `timer` property.

## Timer Source Example

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).
Loading