From 945f23aeb87bcdf78d8e3c6e6870e85aeb551b06 Mon Sep 17 00:00:00 2001 From: xiaojingchen Date: Fri, 7 Dec 2018 16:41:32 +0800 Subject: [PATCH] set connect timeout for set password sql --- charts/tidb-cluster/templates/tidb-initializer-job.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/tidb-cluster/templates/tidb-initializer-job.yaml b/charts/tidb-cluster/templates/tidb-initializer-job.yaml index f015c93490b..f60f3059f17 100644 --- a/charts/tidb-cluster/templates/tidb-initializer-job.yaml +++ b/charts/tidb-cluster/templates/tidb-initializer-job.yaml @@ -28,7 +28,7 @@ spec: # And also avoid plain text password show in Job and Pod spec # Besides we can also add more SQL in the file for initialization, eg. create database, create user etc - | - until mysql -h {{ .Values.clusterName }}-tidb -P 4000 < /data/init-password.sql; do sleep 2; done + until mysql -h {{ .Values.clusterName }}-tidb -P 4000 --connect-timeout=5 < /data/init-password.sql; do sleep 2; done volumeMounts: - name: password mountPath: /data