diff --git a/controllers/apps/operations/switchover_util.go b/controllers/apps/operations/switchover_util.go index 9342898ea4d..bdd8420c188 100644 --- a/controllers/apps/operations/switchover_util.go +++ b/controllers/apps/operations/switchover_util.go @@ -23,7 +23,6 @@ import ( "context" "encoding/json" "fmt" - "github.com/apecloud/kubeblocks/pkg/controller/instanceset" "strings" "github.com/pkg/errors" @@ -36,6 +35,7 @@ import ( appsv1alpha1 "github.com/apecloud/kubeblocks/apis/apps/v1alpha1" "github.com/apecloud/kubeblocks/pkg/constant" "github.com/apecloud/kubeblocks/pkg/controller/component" + "github.com/apecloud/kubeblocks/pkg/controller/instanceset" intctrlutil "github.com/apecloud/kubeblocks/pkg/controllerutil" ) diff --git a/pkg/testutil/apps/constant.go b/pkg/testutil/apps/constant.go index 86d1924409e..d52923f677d 100644 --- a/pkg/testutil/apps/constant.go +++ b/pkg/testutil/apps/constant.go @@ -38,9 +38,9 @@ const ( ServiceVPCName = "vpc-lb" ServiceInternetName = "internet-lb" - ReplicationPodRoleVolume = "pod-role" - ReplicationRoleLabelFieldPath = "metadata.labels['kubeblocks.io/role']" - DefaultReplicationReplicas = 2 + ReplicationPodRoleVolume = "pod-role" + ReplicationRoleLabelFieldPath = "metadata.labels['kubeblocks.io/role']" + DefaultReplicationReplicas = 2 ApeCloudMySQLImage = "docker.io/apecloud/apecloud-mysql-server:latest" DefaultMySQLContainerName = "mysql" @@ -54,8 +54,8 @@ const ( DefaultRedisContainerName = "redis" DefaultRedisInitContainerName = "redis-init-container" - EnvKeyImageTag = "IMAGE_TAG" - DefaultImageTag = "test" + EnvKeyImageTag = "IMAGE_TAG" + DefaultImageTag = "test" DefaultConfigSpecName = "config-cm" DefaultConfigSpecTplRef = "env-from-config-tpl" diff --git a/pkg/testutil/k8s/pod_util.go b/pkg/testutil/k8s/pod_util.go index 9f8ef094364..ee54389a2c0 100644 --- a/pkg/testutil/k8s/pod_util.go +++ b/pkg/testutil/k8s/pod_util.go @@ -22,6 +22,7 @@ package testutil import ( "context" "fmt" + "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors"