-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[bitnami/kafka] Issue 32224- Allow empty values in Kafka config as environment variable #42309
Conversation
Signed-off-by: arushir <arushir@vmware.com>
This reverts commit 53f46db. Signed-off-by: arushir <arushir@vmware.com>
Signed-off-by: arushir <arushir@vmware.com>
Thanks for the PR @arushi315! The PR LGTM but I'll run some internal checks before giving the final approval and merging. |
Hi @FraPazGal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the delay @arushi315, our internal testing threw some errors and I wanted to double-check them first. They were due to transient issues on our end and the changes LGTM.
Thanks for the contribution!
Hi! @FraPazGal @arushi315 Exception:
Part of compose: kafka:
image: 'bitnami/kafka:3.3.2'
hostname: kafka
container_name: kafka
networks:
- test
environment:
- KAFKA_ENABLE_KRAFT=yes
- KAFKA_CFG_PROCESS_ROLES=broker,controller
- KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
- KAFKA_CFG_BROKER_ID=1
- KAFKA_CFG_NODE_ID=1
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=1@kafka:9093
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_KRAFT_CLUSTER_ID=r4zt_wrqTRuT7W2NJsB_GA
- KAFKA_CFG_DELETE_TOPIC_ENABLE=true
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true We fix it with adding Thanks |
This doesn't seem to work for the following kafka:
image: bitnami/kafka:3.5.1
restart: unless-stopped
environment:
KAFKA_KRAFT_CLUSTER_ID: WNfE3WMTRRGBs35BikbfRg # Run 'kafka-storage random-uuid'
BITNAMI_DEBUG: yes
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_ENABLE_KRAFT: yes
KAFKA_CFG_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_CFG_DELETE_TOPIC_ENABLE: 'true'
KAFKA_CFG_LOG_RETENTION_HOURS: 48 # 2 days of retention for demo purposes
KAFKA_CFG_PROCESS_ROLES: controller
KAFKA_CFG_NODE_ID: 1
KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: 1@kafka-controller:9093
KAFKA_CFG_LISTENERS: CONTROLLER://:9093
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,CONTROLLER:PLAINTEXT
KAFKA_CFG_ADVERTISED_LISTENERS: "" # here Getting error when starting
|
Thanks for the reports. As @jekanik said, this change has introduced unwanted breaking changes. This is caused by having some of the We are investigating a hotfix for this issue and we'll try to have more info by the end of the day. |
Hi @FraPazGal |
Hi @arushi315 @jekanik, After investigating possible workarounds and the changes' nature we have opened an internal task to work on a permanent solution for this. In the meantime a working workaround is to explicitly setting a value for any faulty "empty" environment variable so that is uses Kafka's default value. As such, adding the following to your docker-compose should solve the issues:
Unless stated, the values used above are Kafka's default ones. Remember you only need to use these values if you are not already using these envars in your setup. |
Description of the change
Remove the 'Empty String' check for Kafka configuration values in the kafka_configure_from_environment_variables function in the libkafka.sh script for the 3.2, 3.3 and 3.4 Kafka containers
Benefits
This allows the 'ssl.endpoint.identification.algorithm' configuration value to be set to an empty string.
By default, the broker will the 'HTTPS' as the default value. To choose to disable this check, the configuration value must be set to an empty string.
There is a similar setting to configure zookeeper.
Possible drawbacks
This change allows any parameter to be set to an empty string.
Applicable issues
fixes #32224