Skip to content

Commit 114fe50

Browse files
committed
adding first draft of IntegrationSource doc
Signed-off-by: Matthias Wessendorf <[email protected]>
1 parent 421c8e4 commit 114fe50

File tree

2 files changed

+134
-0
lines changed

2 files changed

+134
-0
lines changed

config/nav.yml

+1
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ nav:
230230
- PingSource:
231231
- Creating a PingSource object: eventing/sources/ping-source/README.md
232232
- PingSource reference: eventing/sources/ping-source/reference.md
233+
- IntegrationSource: eventing/sources/integration-source/README.md
233234
- RabbitMQSource: eventing/sources/rabbitmq-source/README.md
234235
- RedisStreamSource:
235236
- About RedisStreamSource: eventing/sources/redis/README.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Knative Source 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+
7+
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.
8+
9+
## Amazon Web Services
10+
11+
The `IntegrationSource` supports a couple of AWS services through its `aws` property, such as `s3`, `sqsq` or `ddbStreams`.
12+
13+
### Amazon credentials
14+
15+
For connecting to AWS the `IntegrationSource` uses Kubernetes `Secret`, present in the namespace of the resource. The `Secret` can be created like:
16+
17+
```bash
18+
kubectl -n <namespace> create secret generic my-secret --from-literal=aws.accessKey=<accessKey> --from-literal=aws.secretKey=<secretKey>
19+
```
20+
21+
### AWS S3 Source
22+
23+
Below is an `IntegrationSource` to receive data from an Amazon S3 Bucket.
24+
25+
```yaml
26+
apiVersion: sources.knative.dev/v1alpha1
27+
kind: IntegrationSource
28+
metadata:
29+
name: integration-source-aws-s3
30+
namespace: knative-samples
31+
spec:
32+
aws:
33+
s3:
34+
arn: "arn:aws:s3:::my-bucket"
35+
region: "eu-north-1"
36+
auth:
37+
secret:
38+
ref:
39+
name: "my-secret"
40+
sink:
41+
ref:
42+
apiVersion: eventing.knative.dev/v1
43+
kind: Broker
44+
name: default
45+
```
46+
47+
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`
48+
49+
More details about the Apache Camel Kamelet [aws-s3-source](https://camel.apache.org/camel-kamelets/latest/aws-s3-source.html).
50+
51+
### AWS SQS Source
52+
53+
Below is an `IntegrationSource` to receive data from AWS SQS.
54+
55+
```yaml
56+
apiVersion: sources.knative.dev/v1alpha1
57+
kind: IntegrationSource
58+
metadata:
59+
name: integration-source-aws-sqs
60+
namespace: knative-samples
61+
spec:
62+
aws:
63+
sqs:
64+
arn: "arn:aws:s3:::my-queue"
65+
region: "eu-north-1"
66+
auth:
67+
secret:
68+
ref:
69+
name: "my-secret"
70+
sink:
71+
ref:
72+
apiVersion: eventing.knative.dev/v1
73+
kind: Broker
74+
name: default
75+
```
76+
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`
77+
78+
More details about the Apache Camel Kamelet [aws-sqs-source](https://camel.apache.org/camel-kamelets/latest/aws-sqs-source.html).
79+
80+
### AWS DynamoDB Streams
81+
82+
Below is an `IntegrationSource` to receive events from Amazon DynamoDB Streams.
83+
84+
```yaml
85+
apiVersion: sources.knative.dev/v1alpha1
86+
kind: IntegrationSource
87+
metadata:
88+
name: integration-source-aws-ddb
89+
namespace: knative-samples
90+
spec:
91+
aws:
92+
ddbStreams:
93+
table: "my-table"
94+
region: "eu-north-1"
95+
auth:
96+
secret:
97+
ref:
98+
name: "my-secret"
99+
sink:
100+
ref:
101+
apiVersion: eventing.knative.dev/v1
102+
kind: Broker
103+
name: default
104+
```
105+
106+
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`
107+
108+
More details about the Apache Camel Kamelet [aws-ddb-streams-source](https://camel.apache.org/camel-kamelets/latest/aws-ddb-streams-source.html).
109+
110+
## Timer Source
111+
112+
Produces periodic messages with a custom payload.
113+
114+
```yaml
115+
apiVersion: sources.knative.dev/v1alpha1
116+
kind: IntegrationSource
117+
metadata:
118+
name: integration-source-timer
119+
namespace: knative-samples
120+
spec:
121+
timer:
122+
period: 2000
123+
message: "Hello, Eventing Core"
124+
sink:
125+
ref:
126+
apiVersion: eventing.knative.dev/v1
127+
kind: Broker
128+
name: default
129+
```
130+
131+
Inside of the `timer` object we define the `period` and the message that is send to the referenced `sink`.
132+
133+
More details about the Apache Camel Kamelet [timer-source](https://camel.apache.org/camel-kamelets/latest/timer-source.html).

0 commit comments

Comments
 (0)