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: add kafka (KRaft mode only) module #1610

Merged
merged 19 commits into from
Sep 18, 2023

Conversation

mdelapenya
Copy link
Member

@mdelapenya mdelapenya commented Sep 12, 2023

What does this PR do?

This PR adds a Kafka module, as a result of updating #1034 by @noctarius to the new design for modules.

The module comes with:

  • a set of predefined env vars.
  • a custom script that is copied right after the container is started, starting Kafka in KRaft mode.
  • a wait strategy that is executed after the contianer is started and after the above file is copied.
  • a container method to get the broker URL for kafka.

We copied the Java module implementation, but providing support for KRaft-only:

  • validation of the lower version (7.0.0)
  • same wait.ForLog message
  • configure controller quorum voters based in the networks/aliases
  • support for setting the cluster ID

Why is it important?

A new module for a technology that is widely used

Related issues

@mdelapenya mdelapenya requested a review from a team as a code owner September 12, 2023 02:19
@mdelapenya mdelapenya added the feature New functionality or new behaviors on the existing one label Sep 12, 2023
@mdelapenya mdelapenya self-assigned this Sep 12, 2023
@netlify
Copy link

netlify bot commented Sep 12, 2023

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit d10d28e
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/65043b608db5270008cbd4ee
😎 Deploy Preview https://deploy-preview-1610--testcontainers-go.netlify.app/modules/kafka
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mdelapenya mdelapenya changed the title feat: add kafka module feat: add kafka (KRaft mode only) module Sep 12, 2023
@mdelapenya
Copy link
Member Author

@eddumelendez if you agree I0d like to proceed and merge this module, as it's clear that it uses kafka + KRaft. We can listen to the future feedback in the case we need to add support for Zookeeper mode. Thoughts?

@mdelapenya mdelapenya merged commit 9a340c3 into testcontainers:main Sep 18, 2023
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Sep 18, 2023
* main:
  feat: add kafka (KRaft mode only) module (testcontainers#1610)
@mdelapenya mdelapenya deleted the kafka-module branch November 6, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or new behaviors on the existing one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Kafka module
1 participant