Merge pull request #4954 from warjiang/clean/reuse-karmadautil

clean: remove duplicate util reference
This commit is contained in:
karmada-bot 2024-05-17 09:45:21 +08:00 committed by GitHub
commit 90b461603c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -55,7 +55,6 @@ import (
cmdutil "github.com/karmada-io/karmada/pkg/karmadactl/util" cmdutil "github.com/karmada-io/karmada/pkg/karmadactl/util"
"github.com/karmada-io/karmada/pkg/karmadactl/util/apiclient" "github.com/karmada-io/karmada/pkg/karmadactl/util/apiclient"
tokenutil "github.com/karmada-io/karmada/pkg/karmadactl/util/bootstraptoken" tokenutil "github.com/karmada-io/karmada/pkg/karmadactl/util/bootstraptoken"
"github.com/karmada-io/karmada/pkg/util"
karmadautil "github.com/karmada-io/karmada/pkg/util" karmadautil "github.com/karmada-io/karmada/pkg/util"
"github.com/karmada-io/karmada/pkg/util/lifted/pubkeypin" "github.com/karmada-io/karmada/pkg/util/lifted/pubkeypin"
"github.com/karmada-io/karmada/pkg/version" "github.com/karmada-io/karmada/pkg/version"
@ -379,7 +378,7 @@ func (o *CommandRegisterOption) Run(parentCommand string) error {
// It's necessary to set the label of namespace to make sure that the namespace is created by Karmada. // It's necessary to set the label of namespace to make sure that the namespace is created by Karmada.
labels := map[string]string{ labels := map[string]string{
util.ManagedByKarmadaLabel: util.ManagedByKarmadaLabelValue, karmadautil.ManagedByKarmadaLabel: karmadautil.ManagedByKarmadaLabelValue,
} }
// ensure namespace where the karmada-agent resources be deployed exists in the member cluster // ensure namespace where the karmada-agent resources be deployed exists in the member cluster
if _, err := karmadautil.EnsureNamespaceExistWithLabels(o.memberClusterClient, o.Namespace, o.DryRun, labels); err != nil { if _, err := karmadautil.EnsureNamespaceExistWithLabels(o.memberClusterClient, o.Namespace, o.DryRun, labels); err != nil {