diff --git a/pkg/apis/pingcap.com/v1alpha1/tidbcluster.go b/pkg/apis/pingcap.com/v1alpha1/tidbcluster.go index c336b058065..47c45b02793 100644 --- a/pkg/apis/pingcap.com/v1alpha1/tidbcluster.go +++ b/pkg/apis/pingcap.com/v1alpha1/tidbcluster.go @@ -25,6 +25,10 @@ func (tc *TidbCluster) TiKVUpgrading() bool { return tc.Status.TiKV.Phase == UpgradePhase } +func (tc *TidbCluster) TiDBUpgrading() bool { + return tc.Status.TiDB.Phase == UpgradePhase +} + func (tc *TidbCluster) PDAllPodsStarted() bool { return tc.PDRealReplicas() == tc.Status.PD.StatefulSet.Replicas }