From 76b92a9c660822b41f8b9b8567c30cb241e4feeb Mon Sep 17 00:00:00 2001 From: xiaojingchen Date: Fri, 7 Dec 2018 18:44:16 +0800 Subject: [PATCH] set connect timeout for set password sql (#219) --- 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 f015c93490..f60f3059f1 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