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

AWS s3 Streaming upload: minor fixes to docs and default value #453

Merged
merged 6 commits into from
Jul 30, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws-s3-streaming-upload-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
title: Batch Size
description: The batch size (in bytes) in streaming upload mode
type: int
default: 1000000
default: '1000000'
namingStrategy:
title: Naming Strategy
description: The naming strategy to use in streaming upload mode. There are 2 enums and the value can be one of progressive, random
Expand Down
41 changes: 41 additions & 0 deletions docs/modules/ROOT/assets/images/kamelets/log-sink.svg
Loading
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
Expand Up @@ -78,6 +78,7 @@
* xref:ROOT:kafka-not-secured-source.adoc[image:kamelets/kafka-not-secured-source.svg[] Kafka Not Secured Source]
* xref:ROOT:kafka-sink.adoc[image:kamelets/kafka-sink.svg[] Kafka Sink]
* xref:ROOT:kafka-source.adoc[image:kamelets/kafka-source.svg[] Kafka Source]
* xref:ROOT:log-sink.adoc[image:kamelets/log-sink.svg[] Log Sink]
* xref:ROOT:mail-imap-source.adoc[image:kamelets/mail-imap-source.svg[] Mail IMAP Source]
* xref:ROOT:mariadb-sink.adoc[image:kamelets/mariadb-sink.svg[] MariaDB Sink]
* xref:ROOT:mariadb-source.adoc[image:kamelets/mariadb-source.svg[] MariaDB Source]
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/aws-s3-streaming-upload-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The following table summarizes the configuration options available for the `aws-
| *secretKey {empty}* *| Secret Key| The secret key obtained from AWS.| string| |
| autoCreateBucket| Autocreate Bucket| Setting the autocreation of the S3 bucket bucketName.| boolean| `false`|
| batchMessageNumber| Batch Message Number| The number of messages composing a batch in streaming upload mode| int| `10`|
| batchSize| Batch Size| The batch size (in bytes) in streaming upload mode| int| `1000000`|
| batchSize| Batch Size| The batch size (in bytes) in streaming upload mode| int| `"1000000"`|
| namingStrategy| Naming Strategy| The naming strategy to use in streaming upload mode. There are 2 enums and the value can be one of progressive, random| string| `"progressive"`|
| restartingPolicy| Restarting Policy| The restarting policy to use in streaming upload mode. There are 2 enums and the value can be one of override, lastPart| string| `"lastPart"`|
| streamingUploadMode| Streaming Upload Mode| Setting the Streaming Upload Mode| boolean| `true`|
Expand Down
121 changes: 121 additions & 0 deletions docs/modules/ROOT/pages/log-sink.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
= image:kamelets/log-sink.svg[] Log Sink

*Provided by: "Apache Software Foundation"*

*Support Level for this Kamelet is: "Preview"*

A sink that logs all data that it receives, useful for debugging purposes.

== Configuration Options

The following table summarizes the configuration options available for the `log-sink` Kamelet:
[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
|===
| Property| Name| Description| Type| Default| Example
| showHeaders| Show Headers| Show the headers received| boolean| `false`|
| showStreams| Show Streams| Show the stream bodies (they may not be available in following steps)| boolean| `false`|
|===

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

== Usage

This section summarizes how the `log-sink` can be used in various contexts.

=== Knative Sink

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

.log-sink-binding.yaml
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: log-sink-binding
spec:
source:
ref:
kind: InMemoryChannel
apiVersion: messaging.knative.dev/v1
name: mychannel
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: log-sink

----

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

Save the `log-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 log-sink-binding.yaml
----

==== *Binding to Knative using the Kamel CLI:*

The procedure described above can be simplified into a single execution of the `kamel bind` command:

[source,shell]
----
kamel bind channel/mychannel log-sink
----

This will create the KameletBinding under the hood and apply it to the current namespace in the cluster.

=== Kafka Sink

The `log-sink` Kamelet can be used as Kafka sink by binding it to a Kafka topic.

.log-sink-binding.yaml
[source,yaml]
----
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: log-sink-binding
spec:
source:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: log-sink

----

Ensure that you've installed https://strimzi.io/[Strimzi] and created a topic named `my-topic` in the current namespace.
Make also sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.

Save the `log-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 log-sink-binding.yaml
----

==== *Binding to Kafka using the Kamel CLI:*

The procedure described above can be simplified into a single execution of the `kamel bind` command:

[source,shell]
----
kamel bind kafka.strimzi.io/v1beta1:KafkaTopic:my-topic log-sink
----

This will create the KameletBinding under the hood and apply it to the current namespace in the cluster.

// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
title: Batch Size
description: The batch size (in bytes) in streaming upload mode
type: int
default: 1000000
default: '1000000'
namingStrategy:
title: Naming Strategy
description: The naming strategy to use in streaming upload mode. There are 2 enums and the value can be one of progressive, random
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7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B2LTQ4aDI1NnYtMTZIMTYwdi00OGgyNTZ2LTE2SDE2MHYtNDhoMjU2di0xNkgxNjB2LTY0aDI4OFY0ODB6Ii8+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8L3N2Zz4NCg=="
camel.apache.org/provider: "Apache Software Foundation"
camel.apache.org/kamelet.group: "Logging"
labels:
camel.apache.org/kamelet.type: "sink"
spec:
Expand Down
1 change: 1 addition & 0 deletions log-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
camel.apache.org/catalog.version: "main-SNAPSHOT"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE2LjAuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2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