From 21b644ab7965e8b5cbfbf8dfcea598c1e8624247 Mon Sep 17 00:00:00 2001 From: weekface Date: Fri, 26 Oct 2018 13:29:40 +0800 Subject: [PATCH 1/2] add readiness probes for tidb service --- pkg/manager/member/tidb_member_manager.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/manager/member/tidb_member_manager.go b/pkg/manager/member/tidb_member_manager.go index 08e1d708f40..10a6de9b5a7 100644 --- a/pkg/manager/member/tidb_member_manager.go +++ b/pkg/manager/member/tidb_member_manager.go @@ -317,6 +317,14 @@ func (tmm *tidbMemberManager) getNewTiDBSetForTidbCluster(tc *v1alpha1.TidbClust Value: strconv.FormatBool(tc.Spec.TiDB.BinlogEnabled), }, }, + ReadinessProbe: &corev1.Probe{ + Handler: corev1.Handler{ + HTTPGet: &corev1.HTTPGetAction{ + Path: "/status", + Port: intstr.FromInt(10080), + }, + }, + }, }, }, RestartPolicy: corev1.RestartPolicyAlways, From e034224c3ac0930ff58db272b1b0566477d59ba4 Mon Sep 17 00:00:00 2001 From: weekface Date: Fri, 26 Oct 2018 14:40:36 +0800 Subject: [PATCH 2/2] add initialDelaySeconds --- pkg/manager/member/tidb_member_manager.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/manager/member/tidb_member_manager.go b/pkg/manager/member/tidb_member_manager.go index 10a6de9b5a7..55e5acb7b1c 100644 --- a/pkg/manager/member/tidb_member_manager.go +++ b/pkg/manager/member/tidb_member_manager.go @@ -324,6 +324,7 @@ func (tmm *tidbMemberManager) getNewTiDBSetForTidbCluster(tc *v1alpha1.TidbClust Port: intstr.FromInt(10080), }, }, + InitialDelaySeconds: int32(10), }, }, },