Skip to content

Commit

Permalink
Clarifies a gotcha: to mount config with log4j.properties ...
Browse files Browse the repository at this point in the history
you must use /opt/kafka/config, due to how log4j.properites
(sometimes tools- or connect-) are resolved by the ./bin scripts.

See solsson/dockerfiles#10
  • Loading branch information
solsson committed Jul 26, 2017
1 parent 8340b11 commit 114b773
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion 50kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ spec:
- name: broker
image: solsson/kafka:0.11.0.0@sha256:e0dec6aa1f376bd374a6ca5863b783d01703acf1f71c0c4441a217a7bd80dfbc
env:
- name: KAFKA_LOG4J_OPTS
value: -Dlog4j.configuration=file:/opt/kafka/config/log4j.properties
- name: JMX_PORT
value: "5555"
ports:
Expand All @@ -39,7 +41,7 @@ spec:
- -c
- >
./bin/kafka-server-start.sh
config/server.properties
./config/server.properties
--override zookeeper.connect=zookeeper:2181
--override log.retention.hours=-1
--override log.dirs=/var/lib/kafka/data/topics
Expand Down
2 changes: 2 additions & 0 deletions zookeeper/50pzoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ spec:
- name: zookeeper
image: solsson/kafka:0.11.0.0@sha256:e0dec6aa1f376bd374a6ca5863b783d01703acf1f71c0c4441a217a7bd80dfbc
env:
- name: KAFKA_LOG4J_OPTS
value: -Dlog4j.configuration=file:/opt/kafka/config/log4j.properties
- name: JMX_PORT
value: "5555"
command:
Expand Down
2 changes: 2 additions & 0 deletions zookeeper/51zoo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ spec:
- name: zookeeper
image: solsson/kafka:0.11.0.0@sha256:e0dec6aa1f376bd374a6ca5863b783d01703acf1f71c0c4441a217a7bd80dfbc
env:
- name: KAFKA_LOG4J_OPTS
value: -Dlog4j.configuration=file:/opt/kafka/config/log4j.properties
- name: JMX_PORT
value: "5555"
command:
Expand Down

0 comments on commit 114b773

Please sign in to comment.