kafka-operator icon indicating copy to clipboard operation
kafka-operator copied to clipboard

Get rid of bash hacking in kafka image

Open krallistic opened this issue 7 years ago • 0 comments

Currently there is a quite some ugly bash code hacking in the kafka image to set advertised listener and broker id correctly.

Command: []string{"/bin/bash",
"-c",
fmt.Sprintf("export KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://$(hostname).%s.$(NAMESPACE).svc.cluster.local:9092; \n"+
"set -ex\n"+
"[[ `hostname` =~ -([0-9]+)$ ]] || exit 1\n"+
"export KAFKA_BROKER_ID=${BASH_REMATCH[1]}\n"+
"/etc/confluent/docker/run", name),

This could be solved better?

krallistic avatar May 12 '17 12:05 krallistic