Closed bo8888 closed 1 year ago
I don't think ZOO_MY_ID
should be calculated based on hostname within the entrypoint. Maybe check some ideas on setting myid here.
I don't think
ZOO_MY_ID
should be calculated based on hostname within the entrypoint. Maybe check some ideas on setting myid here.
zkEnv.sh will automatically execute ${ZOOCFGDIR}/zookeeper-env.sh
if it exists, so users could mount a myid caculation script to /conf/zookeeper-env.sh
by using ConfigMap
. This should be better than using initContainers
. Unfortunatelly /conf/zookeeper-env.sh
is executed after docker-entrypoint.sh
created $ZOO_DATA_DIR/myid
file, so the script must update $ZOO_DATA_DIR/myid
instead of exporting ZOO_MY_ID
environment variable.
It would be more elegant if docker-entrypoint.sh
supports custom init scripts like Nginx image.
auto create myid used in kubernetes StatefulSet when replicas<9