-
Notifications
You must be signed in to change notification settings - Fork 855
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
Don't remove KAFKA_PROPERTIES_FILE; allow user to use mounted file #502
Conversation
This change gives users the option to put their _own_ `KAFKA_PROPERTIES_FILE` into an image _without_ specifying `KAFKA_PROPERTIES`. This is particularly useful in cases where a user does not want to store `KAFKA_PROPERTIES` in version control such as Git. (Even though it is base64-encoded, it is not encrypted.)
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.
Good addition!
Can you update the README.md
and add an alternative docker run
where the Kafka properties file is mounted in read-only?
Something like this:
docker run -d --rm -p 9000:9000 \
-v $(pwd)/kafka.properties:/tmp/kafka.properties:ro \
-e KAFKA_BROKERCONNECT=<host:port,host:port> \
-e KAFKA_PROPERTIES_FILE=/tmp/kafka.properties \
-e KAFKA_TRUSTSTORE="$(cat kafka.truststore.jks | base64)" \ # optional
-e KAFKA_KEYSTORE="$(cat kafka.keystore.jks | base64)" \ # optional
obsidiandynamics/kafdrop
Added. |
Co-authored-by: Bert Roos <[email protected]>
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.
Looks good. Thanks!
Earlier, we used to delete the following files if existing: * kafka.properties * kafka.truststore.jks * kafka.keystore.jks Since #502, we are creating them if not existing. With this commit, we take the middle ground: let the user decide about the existence.
Earlier, we used to delete the following files if existing: * kafka.properties * kafka.truststore.jks * kafka.keystore.jks Since #502, we are creating them if not existing. With this commit, we take the middle ground: let the user decide about the existence.
This change gives users the option to put their own
KAFKA_PROPERTIES_FILE
into an image without specifyingKAFKA_PROPERTIES
.This is particularly useful in cases where a user does not want to store
KAFKA_PROPERTIES
in version control such as Git. (Even though it is base64-encoded, it is not encrypted.)