Skip to content

Commit

Permalink
📖 Adding SNS IntegrationSink example (#6170)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
  • Loading branch information
matzew authored Dec 5, 2024
1 parent 010c514 commit 4d3d539
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ nav:
- IntegrationSink:
- About IntegrationSink: eventing/sinks/integration-sink/README.md
- AWS S3 Sink: eventing/sinks/integration-sink/aws_s3.md
- AWS SNS Sink: eventing/sinks/integration-sink/aws_sns.md
- AWS SQS Sink: eventing/sinks/integration-sink/aws_sqs.md
- Generic Logger Sink: eventing/sinks/integration-sink/logger.md
- Flows:
Expand Down
1 change: 1 addition & 0 deletions docs/eventing/sinks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ The `svc` in `http://event-display.svc.cluster.local` determines that the sink i
| Name | Maintainer | Description |
|----------------------------------------------------------------------------------| -- |--------------------------------------|
| [Amazon S3 Sink](./integration-sink/aws_s3.md) | Knative | Send events to AWS S3 bucket |
| [Amazon SNS Sink](./integration-sink/aws_sns.md) | Knative | Send events to AWS SNS topic |
| [Amazon SQS Sink](./integration-sink/aws_sqs.md) | Knative | Send events to AWS SQS queue |
| [JobSink](job-sink.md) | Knative | Trigger long-running background jobs |
| [KafkaSink](kafka-sink.md) | Knative | Send events to a Kafka topic |
Expand Down
1 change: 1 addition & 0 deletions docs/eventing/sinks/integration-sink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ The `IntegrationSink` is a Knative Eventing custom resource supporting selected
## Supported Kamelet sinks

* [AWS S3](./aws_s3.md)
* [AWS SNS](./aws_sns.md)
* [AWS SQS](./aws_sqs.md)
* [Generic logger](./logger.md)
2 changes: 1 addition & 1 deletion docs/eventing/sinks/integration-sink/aws_s3.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The `IntegrationSink` supports the Amazon Web Services (AWS) S3 service, through

## Amazon credentials

For connecting to AWS the `IntegrationSink` uses Kubernetes `Secret`, present in the namespace of the reSink. The `Secret` can be created like:
For connecting to AWS the `IntegrationSink` 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>
Expand Down
35 changes: 35 additions & 0 deletions docs/eventing/sinks/integration-sink/aws_sns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# AWS Simple Notification Service Sink

The `IntegrationSink` supports the Amazon Web Services (AWS) Simple Notification Service (SNS) service, through its `aws.sns` property.

## Amazon credentials

For connecting to AWS the `IntegrationSink` 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 Sink Example

Below is an `IntegrationSink` to send data to AWS SNS:

```yaml
apiVersion: sinks.knative.dev/v1alpha1
kind: IntegrationSink
metadata:
name: integration-sink-aws-sns
namespace: knative-samples
spec:
aws:
sns:
arn: "my-topic"
region: "eu-north-1"
auth:
secret:
ref:
name: "my-secret"
```
Inside of the `aws.sns` object we define the name of the topic (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-sns-sink](https://camel.apache.org/camel-kamelets/latest/aws-sns-sink.html).
2 changes: 1 addition & 1 deletion docs/eventing/sinks/integration-sink/aws_sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The `IntegrationSink` supports the Amazon Web Services (AWS) Simple Queue Servic

## Amazon credentials

For connecting to AWS the `IntegrationSink` uses Kubernetes `Secret`, present in the namespace of the reSink. The `Secret` can be created like:
For connecting to AWS the `IntegrationSink` 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>
Expand Down

0 comments on commit 4d3d539

Please sign in to comment.