Skip to content

Commit

Permalink
Remove check in pvc replacer for sts in upgrade (#5382)
Browse files Browse the repository at this point in the history
Co-authored-by: Xuecheng Zhang <[email protected]>
  • Loading branch information
anish-db and csuzhangxc authored Nov 10, 2023
1 parent 6f07084 commit a076c0e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/manager/volumes/pvc_replacer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

"github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1"
"github.com/pingcap/tidb-operator/pkg/controller"
"github.com/pingcap/tidb-operator/pkg/manager/utils"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
errutil "k8s.io/apimachinery/pkg/util/errors"
Expand Down Expand Up @@ -142,9 +141,6 @@ func (p *pvcReplacer) tryToRecreateSTS(ctx *componentVolumeContext) error {
if isSynced {
return nil
}
if utils.StatefulSetIsUpgrading(ctx.sts) {
return fmt.Errorf("component sts %s/%s is upgrading", ctx.sts.Namespace, ctx.sts.Name)
}

orphan := metav1.DeletePropagationOrphan
if err := p.deps.KubeClientset.AppsV1().StatefulSets(ns).Delete(ctx, name, metav1.DeleteOptions{PropagationPolicy: &orphan}); err != nil {
Expand Down

0 comments on commit a076c0e

Please sign in to comment.