rgw: support kafka auth mechanism parameter
Ceph has support [1,2] for configuring which authentication mechanism to use for bucket notifications using Kafka topics. This commit adds the corresponding support to rook. [1]: https://github.com/ceph/ceph/pull/48181/commits/d5dce601f65974a21c83c4b1add036030a75c3c4 [2]: https://tracker.ceph.com/issues/57608 Signed-off-by: Ragnar Dahlén <r.dahlen@gmail.com>
This commit is contained in:
1 parent
d05a4e88ca
commit
8bf7c679bb
9 files changed
+53
-3
No files matched your search
@@ -176,6 +176,7 @@ func createTopicAttributes(topic *cephv1.CephBucketTopic) map[string]*string {
|
||||
attr["kafka-ack-level"] = &topic.Spec.Endpoint.Kafka.AckLevel
|
||||
verifySSL = strconv.FormatBool(!topic.Spec.Endpoint.Kafka.DisableVerifySSL)
|
||||
attr["verify-ssl"] = &verifySSL
|
||||
attr["mechanism"] = &topic.Spec.Endpoint.Kafka.Mechanism
|
||||
}
|
||||
|
||||
return attr
|
||||
|
||||
@@ -101,6 +101,7 @@ func TestTopicAttributesCreation(t *testing.T) {
|
||||
t.Run("test Kafka attributes", func(t *testing.T) {
|
||||
uri := "kafka://my-kafka-service:9092"
|
||||
ackLevel := "broker"
|
||||
mechanism := "SCRAM-SHA-512"
|
||||
expectedAttrs := map[string]*string{
|
||||
"OpaqueData": &emptyString,
|
||||
"persistent": &falseString,
|
||||
@@ -108,6 +109,7 @@ func TestTopicAttributesCreation(t *testing.T) {
|
||||
"verify-ssl": &trueString,
|
||||
"kafka-ack-level": &ackLevel,
|
||||
"use-ssl": &trueString,
|
||||
"mechanism": &mechanism,
|
||||
}
|
||||
bucketTopic := &cephv1.CephBucketTopic{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -122,9 +124,10 @@ func TestTopicAttributesCreation(t *testing.T) {
|
||||
ObjectStoreNamespace: namespace,
|
||||
Endpoint: cephv1.TopicEndpointSpec{
|
||||
Kafka: &cephv1.KafkaEndpointSpec{
|
||||
URI: uri,
|
||||
AckLevel: ackLevel,
|
||||
UseSSL: true,
|
||||
URI: uri,
|
||||
AckLevel: ackLevel,
|
||||
UseSSL: true,
|
||||
Mechanism: mechanism,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user