Skip to content

Conversation

@scprek
Copy link

@scprek scprek commented Feb 4, 2025

Resolves /discussions/818

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)

@scprek scprek requested a review from a team as a code owner February 4, 2025 15:32
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Feb 4, 2025
environment:
# Normally you do not have to specify all these environment variables, but we are doing it to make kafka-ui work
# as the defaults are all localhost instead of a docker compose service name
# See: Defaults https://github.com/confluentinc/kafka-images/blob/master/local/include/etc/confluent/docker/configureDefaults
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a way to "hack" docker compose to treat kafka0 interactions from the other services as localhost (the default env vars in the image). So I ended up just overriding all ENV vars that had localhost in it that were required for Kafka UI and init kafka topics to work.

@Haarolean
Copy link
Member

Hi @scprek could you elaborate please, what does this compose add/solve? From your original discussion, it seems that you're interested in a kraft-enabled kafka instance, which is, well, most of the compose examples present in documentation/compose are about.

@scprek
Copy link
Author

scprek commented Jul 10, 2025

Hi @scprek could you elaborate please, what does this compose add/solve? From your original discussion, it seems that you're interested in a kraft-enabled kafka instance, which is, well, most of the compose examples present in documentation/compose are about.

Hi yes I can elaborate,

I wanted a way to use image: confluentinc/confluent-local:latest without needing to do any of this stuff since in theory that image is already setup.

      KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka0:29092,PLAINTEXT_HOST://localhost:9092'
      KAFKA_CONTROLLER_QUORUM_VOTERS: '1@kafka0:29093'
      KAFKA_LISTENERS: 'PLAINTEXT://kafka0:29092,CONTROLLER://kafka0:29093,PLAINTEXT_HOST://0.0.0.0:9092'
      KAFKA_REST_BOOTSTRAP_SERVERS: 'kafka0:29092'

There's a difference between enabling kraft in a Kafka image and using the Kraft/optimized image confluent-local directly.

See: https://docs.confluent.io/platform/current/installation/docker/image-reference.html#ak-images

@Haarolean Haarolean added the hacktoberfest-accepted PRs accepted towards hacktoberfest goal and will be counted as approved label Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PRs accepted towards hacktoberfest goal and will be counted as approved status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants