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

Feat(source): franzKafka support tls #186

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
41 changes: 34 additions & 7 deletions docs/reference/pipelines/source/franzkafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,33 @@
(本sink和kafka sink的区别一般只在于使用的kafka golang库不同,提供给对franz kafka库有偏好的用户使用)

!!! example
```yaml

简单
``` yaml
sources:
- type: franzKafka
brokers: ["127.0.0.1:9092"]
topic: log-*
```
SASL+TLS认证
```yaml
sources:
- type: kafka
brokers: ["kafka1.kafka.svc:9092"]
- type: franzKafka
brokers: ["127.0.0.1:9092"]
topic: log-*
```
tls:
enabled: true
caCertFiles: /data/ca.crt
endpIdentAlgo: false
sasl:
enabled: true
mechanism: SCRAM-SHA-256
username: admin
password: admin

```


!!! note "支持的Kafka版本"

该kafka sink使用的是[segmentio/kafka-go](https://github.com/segmentio/kafka-go)库。当前Loggie使用的库版本为`v0.4.39`,对应版本测试支持的Kafka版本为:[0.10.1.0 - 2.7.1](https://github.com/segmentio/kafka-go/tree/v0.4.39#kafka-versions)


## brokers
Expand Down Expand Up @@ -120,6 +137,16 @@
| sasl.username | string | 必填 | | 用户名 |
| sasl.password | string | 必填 | | 密码 |

## tls

| `字段` | `类型` | `是否必填` | `默认值` | `含义` |
|------------------------|--------| ----------- | --------- |-----------------------|
| tls.enabled | bool | 非必填 | false | 是否启用 |
| tls.caCertFiles | string | 非必填 | | 证书文件路径 |
| tls.clientCertFile | string | 必填 | | SASL类型,可为:`客户端cert文件` |
| tls.clientKeyFile | string | 必填 | | SASL类型,可为:`客户端key文件` |
| tls.endpIdentAlgo | bool | type=scram时必填 | | 客户端是否验证服务端的证书名字 |


## gssapi

Expand Down