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

Kinesis Firehose Kamelet Sink #115

Merged
merged 4 commits into from
Apr 2, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
51 changes: 51 additions & 0 deletions aws-kinesis-firehose-sink.kamelet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
name: aws-kinesis-firehose-sink
annotations:
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgODUgODUiIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI0EiIHg9IjIuNSIgeT0iMi41Ii8+PHN5bWJvbCBpZD0iQSIgb3ZlcmZsb3c9InZpc2libGUiPjxnIHN0cm9rZT0ibm9uZSI+PHBhdGggZD0iTTEzLjc2NiAzLjEyaDUyLjQ2OGMzLjY1MSAwIDcuMTUyIDEuMzYzIDkuNzM0IDMuNzg4UzgwIDEyLjYyNCA4MCAxNi4wNTR2MjEuNjk4Yy0yLjcxNy0xLjMxOS04LjY2NC0yLjcyMy0xNy40NjQtMi43MjMtMy4zNy0uMDEzLTYuNzM3LjIyNC0xMC4wNjguNzA5LTUuOTMyLjkyMi05LjA1NyAyLjUxLTkuMDU3IDMuNDg5djM2Ljg3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DY5LjcyIDIwLjQyMnptLTU3LjU2OS0uMDAxdjE0LjE4MmgyMC44M1YxMC40NTJINy42MDh2NS43MTV6bTUuODExIDMzLjUxMnYxNC4xODJoMjAuODNWNDMuOTY0aC0yMC44M3Y1LjcxNXoiLz48L2c+PC9zeW1ib2w+PC9zdmc+"
camel.apache.org/provider: "Apache Software Foundation"
labels:
camel.apache.org/kamelet.type: sink
spec:
definition:
title: AWS Kinesis Firehose Sink
description: |-
Send message to an AWS Kinesis Firehose Stream
required:
- streamName
- accessKey
- secretKey
- region
properties:
streamName:
title: Stream name
description: The name of the stream we want to send to data to
type: string
accessKey:
title: Access Key
description: The access key obtained from AWS
type: string
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
secretKey:
title: Secret Key
description: The secret key obtained from AWS
type: string
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
region:
title: AWS Region
description: The AWS region to connect to
type: string
example: eu-west-1
flow:
from:
uri: kamelet:source
steps:
- to:
uri: "aws2-kinesis-firehose:{{streamName}}"
parameters:
accessKey: "{{accessKey}}"
secretKey: "{{secretKey}}"
region: "{{region}}"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
* xref:ROOT:aws-ddb-streams-source.adoc[image:kamelets/aws-ddb-streams-source.svg[] AWS DynamoDB Streams Source]
* xref:ROOT:aws-kinesis-firehose-sink.adoc[image:kamelets/aws-kinesis-firehose-sink.svg[] AWS Kinesis Firehose Sink]
* xref:ROOT:aws-kinesis-source.adoc[image:kamelets/aws-kinesis-source.svg[] AWS Kinesis Source]
* xref:ROOT:aws-lambda-sink.adoc[image:kamelets/aws-lambda-sink.svg[] AWS Lambda Sink]
* xref:ROOT:aws-s3-source.adoc[image:kamelets/aws-s3-source.svg[] AWS S3 Source]
Expand Down
66 changes: 66 additions & 0 deletions docs/modules/ROOT/pages/aws-kinesis-firehose-sink.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
= image:kamelets/aws-kinesis-firehose-sink.svg[] AWS Kinesis Firehose Sink

*Provided by: "Apache Software Foundation"*

Send message to an AWS Kinesis Firehose Stream

== Configuration Options

The following table summarizes the configuration options available for the `aws-kinesis-firehose-sink` Kamelet:
[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
|===
| Property| Name| Description| Type| Default| Example
| *accessKey {empty}* *| Access Key| The access key obtained from AWS| string| |
| *region {empty}* *| AWS Region| The AWS region to connect to| string| | `"eu-west-1"`
| *secretKey {empty}* *| Secret Key| The secret key obtained from AWS| string| |
| *streamName {empty}* *| Stream name| The name of the stream we want to send to data to| string| |
|===

NOTE: Fields marked with ({empty}*) are mandatory.

== Usage

This section summarizes how the `aws-kinesis-firehose-sink` can be used in various contexts.

=== Knative Sink

The `aws-kinesis-firehose-sink` Kamelet can be used as Knative sink by binding it to a Knative object.

.aws-kinesis-firehose-sink-binding.yaml
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: aws-kinesis-firehose-sink-binding
spec:
source:
ref:
kind: InMemoryChannel
apiVersion: messaging.knative.dev/v1
name: mychannel
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: aws-kinesis-firehose-sink
properties:
accessKey: "The Access Key"
region: "eu-west-1"
secretKey: "The Secret Key"
streamName: "The Stream name"

----

Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.

Save the `aws-kinesis-firehose-sink-binding.yaml` file into your hard drive, then configure it according to your needs.

You can run the sink using the following command:

[source,shell]
----
kubectl apply -f aws-kinesis-firehose-sink-binding.yaml
----
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT