confluentinc / kafka-images

Confluent Docker images for Apache Kafka
Apache License 2.0
13 stars 134 forks source link

Production-ready approach to add connectors to Kakfa Connect #174

Open bfanyuk opened 1 year ago

bfanyuk commented 1 year ago

Docker image for Kafka Connect runs in distributed mode thus adding a new connector can only be done via http endpoint. The problem with this endpoint is that it is only available in runtime, so I cannot add this in build phase, and there's no automated way to call this endpoint. There's an article explaining a workaround https://rmoff.net/2018/12/15/docker-tips-and-tricks-with-kafka-connect-ksqldb-and-kafka/

However, I assume there could be some more elegant and automated way to do this. Maybe some environment variable pointing to the connector configuration file. Please let me know if this possibility already exists, otherwise would be great to file this as Enhancement Request.

Thanks!

OneCricketeer commented 1 year ago

The linked way is the only way to create connectors using this image.

The alternative approach is to use Operators such as Strimzi which allow you to define connectors as Kubernetes resources