diff --git a/tests/cmd/stability/main.go b/tests/cmd/stability/main.go index 1cb878ef24a..545d5acf631 100644 --- a/tests/cmd/stability/main.go +++ b/tests/cmd/stability/main.go @@ -34,7 +34,6 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "k8s.io/component-base/logs" "k8s.io/kubernetes/test/e2e/framework/log" - "k8s.io/utils/pointer" ) var cfg *tests.Config @@ -396,8 +395,6 @@ func newTidbClusterConfig(ns, clusterName string) *tests.TidbClusterConfig { tidbVersion := cfg.GetTiDBVersionOrDie() topologyKey := "rack" tc := fixture.GetTidbCluster(ns, clusterName, tidbVersion) - tc.Spec.PD.StorageClassName = pointer.StringPtr("local-storage") - tc.Spec.TiKV.StorageClassName = pointer.StringPtr("local-storage") tc.Spec.ConfigUpdateStrategy = v1alpha1.ConfigUpdateStrategyRollingUpdate return &tests.TidbClusterConfig{ Namespace: ns, @@ -407,7 +404,6 @@ func newTidbClusterConfig(ns, clusterName string) *tests.TidbClusterConfig { TiKVImage: fmt.Sprintf("pingcap/tikv:%s", tidbVersion), TiDBImage: fmt.Sprintf("pingcap/tidb:%s", tidbVersion), PumpImage: fmt.Sprintf("pingcap/tidb-binlog:%s", tidbVersion), - StorageClassName: "local-storage", UserName: "root", Password: "", InitSecretName: fmt.Sprintf("%s-set-secret", clusterName), diff --git a/tests/e2e/e2e.go b/tests/e2e/e2e.go index b9665e07164..e18d06818ed 100644 --- a/tests/e2e/e2e.go +++ b/tests/e2e/e2e.go @@ -147,7 +147,7 @@ func setupSuite() { // The default storage class of kind is local-path-provisioner which // consumes local storage like local-volume-provisioner. However, it's not // stable in our e2e testing. - if framework.TestContext.Provider == "gke" || framework.TestContext.Provider == "aws" || framework.TestContext.Provider == "kind" { + if framework.TestContext.Provider == "gke" || framework.TestContext.Provider == "aws" { defaultSCName := "local-storage" list, err := c.StorageV1().StorageClasses().List(metav1.ListOptions{}) framework.ExpectNoError(err, "list storage class failed") diff --git a/tests/e2e/tidbcluster/tidbcluster.go b/tests/e2e/tidbcluster/tidbcluster.go index 81ecca3aef3..4013bbc9849 100644 --- a/tests/e2e/tidbcluster/tidbcluster.go +++ b/tests/e2e/tidbcluster/tidbcluster.go @@ -464,8 +464,7 @@ var _ = ginkgo.Describe("TiDBCluster", func() { SchedulerName: pointer.StringPtr("default-scheduler"), ConfigUpdateStrategy: &updateStrategy, }, - Replicas: 1, - StorageClassName: pointer.StringPtr("local-storage"), + Replicas: 1, ResourceRequirements: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceStorage: resource.MustParse("10Gi"), @@ -1570,7 +1569,6 @@ func newTidbClusterConfig(cfg *tests.Config, ns, clusterName, password, tcVersio TiKVImage: fmt.Sprintf("pingcap/tikv:%s", tcVersion), TiDBImage: fmt.Sprintf("pingcap/tidb:%s", tcVersion), PumpImage: fmt.Sprintf("pingcap/tidb-binlog:%s", tcVersion), - StorageClassName: "local-storage", Password: password, UserName: "root", InitSecretName: fmt.Sprintf("%s-set-secret", clusterName), diff --git a/tests/pkg/fixture/fixture.go b/tests/pkg/fixture/fixture.go index e80d688a524..57749be44f5 100644 --- a/tests/pkg/fixture/fixture.go +++ b/tests/pkg/fixture/fixture.go @@ -292,8 +292,6 @@ func NewTidbMonitor(name, namespace string, tc *v1alpha1.TidbCluster, grafanaEna } } if persist { - storageClassName := "local-storage" - monitor.Spec.StorageClassName = &storageClassName monitor.Spec.Storage = "2Gi" monitor.Spec.Persistent = true } @@ -444,9 +442,7 @@ func GetBackupCRDWithS3(tc *v1alpha1.TidbCluster, fromSecretName, brType string, }, } if brType == DumperType { - storage := "local-storage" br.Spec.BR = nil - br.Spec.StorageClassName = &storage br.Spec.StorageSize = "1Gi" } return br @@ -481,9 +477,7 @@ func GetRestoreCRDWithS3(tc *v1alpha1.TidbCluster, toSecretName, restoreType str }, } if restoreType == DumperType { - storage := "local-storage" restore.Spec.BR = nil - restore.Spec.StorageClassName = &storage restore.Spec.StorageSize = "1Gi" restore.Spec.S3.Path = fmt.Sprintf("s3://%s/%s", s3config.Bucket, s3config.Path) } @@ -524,8 +518,7 @@ func AddPumpForTidbCluster(tc *v1alpha1.TidbCluster) *v1alpha1.TidbCluster { SchedulerName: pointer.StringPtr("default-scheduler"), ConfigUpdateStrategy: &tc.Spec.ConfigUpdateStrategy, }, - Replicas: 1, - StorageClassName: pointer.StringPtr("local-storage"), + Replicas: 1, ResourceRequirements: corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceStorage: resource.MustParse("10Gi"),