Ceph Source
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Receive data from an Ceph Bucket, managed by a Object Storage Gateway.
Configuration Options
The following table summarizes the configuration options available for the ceph-source
Kamelet:
Property | Name | Description | Type | Default | Example |
---|---|---|---|---|---|
Access Key |
Required The access key. |
string |
|||
Bucket Name |
Required The Ceph Bucket name. |
string |
|||
Ceph Url Address |
Required Set the Ceph Object Storage Address Url. |
string |
http://ceph-storage-address.com |
||
Secret Key |
Required The secret key. |
string |
|||
Bucket Zone Group |
Required The bucket zone group. |
string |
|||
Autocreate Bucket |
Specifies to automatically create the bucket. |
boolean |
false |
||
Delay |
The number of milliseconds before the next poll of the selected bucket. |
integer |
500 |
||
Auto-delete Objects |
Specifies to delete objects after consuming them. |
boolean |
true |
||
Ignore Body |
If true, the Object body is ignored. Setting this to true overrides any behavior defined by the |
boolean |
false |
||
Include Body |
If true, the exchange is consumed and put into the body and closed. If false, the Object stream is put raw into the body and the headers are set with the object metadata. |
boolean |
true |
||
Prefix |
The bucket prefix to consider while searching. |
string |
folder/ |
Dependencies
At runtime, the ceph-source
Kamelet relies upon the presence of the following dependencies:
-
camel:aws2-s3
-
camel:kamelet
Usage
This section describes how you can use the ceph-source
.
Knative source
You can use the ceph-source
Kamelet as a Knative source by binding it to a Knative object.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: ceph-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: ceph-source
properties:
accessKey: The Access Key
bucketName: The Bucket Name
cephUrl: http://ceph-storage-address.com
secretKey: The Secret Key
zoneGroup: The Bucket Zone Group
sink:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
Prerequisite
You have Camel K installed on the cluster.
Procedure for using the cluster CLI
-
Save the
ceph-source-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the source by using the following command:
kubectl apply -f ceph-source-binding.yaml
Procedure for using the Kamel CLI
Configure and run the source by using the following command:
kamel bind ceph-source -p "source.accessKey=The Access Key" -p "source.bucketName=The Bucket Name" -p "source.cephUrl=\http://ceph-storage-address.com" -p "source.secretKey=The Secret Key" -p "source.zoneGroup=The Bucket Zone Group" channel:mychannel
This command creates the KameletBinding in the current namespace on the cluster.
Kafka source
You can use the ceph-source
Kamelet as a Kafka source by binding it to a Kafka topic.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: ceph-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: ceph-source
properties:
accessKey: The Access Key
bucketName: The Bucket Name
cephUrl: http://ceph-storage-address.com
secretKey: The Secret Key
zoneGroup: The Bucket Zone Group
sink:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
Prerequisites
-
You’ve installed Strimzi.
-
You’ve created a topic named
my-topic
in the current namespace. -
You have Camel K installed on the cluster.
Procedure for using the cluster CLI
-
Save the
ceph-source-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the source by using the following command:
kubectl apply -f ceph-source-binding.yaml
Procedure for using the Kamel CLI
Configure and run the source by using the following command:
kamel bind ceph-source -p "source.accessKey=The Access Key" -p "source.bucketName=The Bucket Name" -p "source.cephUrl=\http://ceph-storage-address.com" -p "source.secretKey=The Secret Key" -p "source.zoneGroup=The Bucket Zone Group" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
This command creates the KameletBinding in the current namespace on the cluster.