Skip to content

Commit ce2cfa9

Browse files
matzewCali0707
andauthored
Adding initial doc for IntegrationSink (#6163)
* Adding initial doc for IntegrationSink Signed-off-by: Matthias Wessendorf <[email protected]> * Update docs/eventing/sinks/integration-sink/logger.md Co-authored-by: Calum Murray <[email protected]> * Update docs/eventing/sinks/integration-sink/aws_sqs.md Co-authored-by: Calum Murray <[email protected]> * Update docs/eventing/sinks/integration-sink/aws_s3.md Co-authored-by: Calum Murray <[email protected]> * Update docs/eventing/sinks/integration-sink/README.md Co-authored-by: Calum Murray <[email protected]> * Update docs/eventing/sinks/README.md Co-authored-by: Calum Murray <[email protected]> --------- Signed-off-by: Matthias Wessendorf <[email protected]> Co-authored-by: Calum Murray <[email protected]>
1 parent ce88f0f commit ce2cfa9

File tree

6 files changed

+112
-0
lines changed

6 files changed

+112
-0
lines changed

config/nav.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ nav:
250250
- About sinks: eventing/sinks/README.md
251251
- JobSink: eventing/sinks/job-sink.md
252252
- Apache Kafka Sink: eventing/sinks/kafka-sink.md
253+
- IntegrationSink:
254+
- About IntegrationSink: eventing/sinks/integration-sink/README.md
255+
- AWS S3 Sink: eventing/sinks/integration-sink/aws_s3.md
256+
- AWS SQS Sink: eventing/sinks/integration-sink/aws_sqs.md
257+
- Generic Logger Sink: eventing/sinks/integration-sink/logger.md
253258
- Flows:
254259
- About flows: eventing/flows/README.md
255260
- Parallel: eventing/flows/parallel.md

docs/eventing/sinks/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ The `svc` in `http://event-display.svc.cluster.local` determines that the sink i
132132

133133
| Name | Maintainer | Description |
134134
|----------------------------------------------------------------------------------| -- |--------------------------------------|
135+
| [IntegrationSink](./integration-sink/README.md) | Knative | Send events to a generic event sink |
135136
| [JobSink](job-sink.md) | Knative | Trigger long-running background jobs |
136137
| [KafkaSink](kafka-sink.md) | Knative | Send events to a Kafka topic |
137138
| [RedisSink](https://github.com/knative-extensions/eventing-redis/tree/main/sink) | Knative | Send events to a Redis Stream |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Knative Sink for Apache Camel Kamelet integrations
2+
3+
![stage](https://img.shields.io/badge/Stage-alpah-red?style=flat-square)
4+
![version](https://img.shields.io/badge/API_Version-v1alpha1-red?style=flat-square)
5+
6+
The `IntegrationSink` 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 `IntegrationSink` allows sending data to external systems out of Knative Eventing in the format of CloudEvents. The integration sink is part of the Knative Eventing core installation.
7+
8+
## Supported Kamelet sinks
9+
10+
* [AWS S3](./aws_s3.md)
11+
* [AWS SQS](./aws_sqs.md)
12+
* [Generic logger](./logger.md)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# AWS S3 Sink
2+
3+
The `IntegrationSink` supports the Amazon Web Services (AWS) S3 service, through its `aws.s3` property.
4+
5+
## Amazon credentials
6+
7+
For connecting to AWS the `IntegrationSink` uses Kubernetes `Secret`, present in the namespace of the reSink. The `Secret` can be created like:
8+
9+
```bash
10+
kubectl -n <namespace> create secret generic my-secret --from-literal=aws.accessKey=<accessKey> --from-literal=aws.secretKey=<secretKey>
11+
```
12+
13+
## AWS S3 Sink Example
14+
15+
Below is an `IntegrationSink` to send data to an Amazon S3 Bucket:
16+
17+
```yaml
18+
apiVersion: sinks.knative.dev/v1alpha1
19+
kind: IntegrationSink
20+
metadata:
21+
name: integration-sink-aws-s3
22+
namespace: knative-samples
23+
spec:
24+
aws:
25+
s3:
26+
arn: "arn:aws:s3:::my-bucket"
27+
region: "eu-north-1"
28+
auth:
29+
secret:
30+
ref:
31+
name: "my-secret"
32+
```
33+
34+
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`
35+
36+
More details about the Apache Camel Kamelet [aws-s3-sink](https://camel.apache.org/camel-kamelets/latest/aws-s3-sink.html).
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AWS Simple Queue Service Sink
2+
3+
The `IntegrationSink` supports the Amazon Web Services (AWS) Simple Queue Service (SQS) service, through its `aws.sqs` property.
4+
5+
## Amazon credentials
6+
7+
For connecting to AWS the `IntegrationSink` uses Kubernetes `Secret`, present in the namespace of the reSink. The `Secret` can be created like:
8+
9+
```bash
10+
kubectl -n <namespace> create secret generic my-secret --from-literal=aws.accessKey=<accessKey> --from-literal=aws.secretKey=<secretKey>
11+
```
12+
13+
## AWS SQS Sink Example
14+
15+
Below is an `IntegrationSink` to send data to AWS SQS:
16+
17+
```yaml
18+
apiVersion: sinks.knative.dev/v1alpha1
19+
kind: IntegrationSink
20+
metadata:
21+
name: integration-sink-aws-sqs
22+
namespace: knative-samples
23+
spec:
24+
aws:
25+
sqs:
26+
arn: "arn:aws:s3:::my-queue"
27+
region: "eu-north-1"
28+
auth:
29+
secret:
30+
ref:
31+
name: "my-secret"
32+
```
33+
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`
34+
35+
More details about the Apache Camel Kamelet [aws-sqs-sink](https://camel.apache.org/camel-kamelets/latest/aws-sqs-sink.html).
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Log Sink
2+
3+
The `IntegrationSink` supports the _Log Sink Kamelet_ that logs all data that it receives, through its `log` property. This sink useful for debugging purposes.
4+
5+
## Log Sink Example
6+
7+
Below is an `IntegrationSink` that logs all data that it receives:
8+
9+
```yaml
10+
apiVersion: sinks.knative.dev/v1alpha1
11+
kind: IntegrationSink
12+
metadata:
13+
name: integration-log-sink
14+
namespace: knative-samples
15+
spec:
16+
log:
17+
showHeaders: true
18+
level: INFO
19+
```
20+
21+
Inside of the `log` object we define the logging `level` and define to also show (HTTP) headers it received.
22+
23+
More details about the Apache Camel Kamelet [timer-sink](https://camel.apache.org/camel-kamelets/latest/timer-sink.html).

0 commit comments

Comments
 (0)