diff --git a/deploy/charts/emqx/values.yaml b/deploy/charts/emqx/values.yaml index f75afcc06..45b966c3b 100644 --- a/deploy/charts/emqx/values.yaml +++ b/deploy/charts/emqx/values.yaml @@ -40,7 +40,7 @@ initContainers: {} # image: alpine # command: ["sh", "-c", "for i in $(seq 1 300); do nc -zvw1 mysql 3306 && exit 0 || sleep 3; done; exit 1"] -## EMQX configuration item, see the documentation (https://github.com/emqx/emqx-docker#emq-x-configuration) +## EMQX configuration item, see the documentation (https://hub.docker.com/r/emqx/emqx) emqxConfig: EMQX_CLUSTER__K8S__APISERVER: "https://kubernetes.default.svc:443" ## The address type is used to extract host from k8s service. diff --git a/deploy/docker/start.sh b/deploy/docker/start.sh index e4e590363..0964bdf63 100755 --- a/deploy/docker/start.sh +++ b/deploy/docker/start.sh @@ -1,6 +1,8 @@ #!/bin/sh set -e -u +EMQX_WAIT_TIME=${EMQX_WAIT_TIME:-5} + emqx_exit(){ # At least erlang.log.1 exists if [ -f /opt/emqx/log/erlang.log.1 ]; then @@ -53,7 +55,7 @@ while [ $IDLE_TIME -lt 5 ]; do else echo "['$(date -u +"%Y-%m-%dT%H:%M:%SZ")']:emqx not running, waiting for recovery in $((25-IDLE_TIME*5)) seconds" fi - sleep 5 + sleep $EMQX_WAIT_TIME done # If running to here (the result 5 times not is running, thus in 25s emqx is not running), exit docker image