From f5eeaf6dd3fc6e5c8ff3ed00d96e35f231e2f31b Mon Sep 17 00:00:00 2001 From: RainbowMango Date: Sat, 9 Jul 2022 18:35:48 +0800 Subject: [PATCH] Fixed misleading or outdate comments about --cluster-namespace flag Signed-off-by: RainbowMango --- pkg/karmadactl/get.go | 4 ++-- pkg/karmadactl/join.go | 2 +- pkg/karmadactl/options/global.go | 2 +- pkg/karmadactl/promote.go | 2 +- pkg/karmadactl/unjoin.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/karmadactl/get.go b/pkg/karmadactl/get.go index 7750cc9c9..9009688ab 100644 --- a/pkg/karmadactl/get.go +++ b/pkg/karmadactl/get.go @@ -105,7 +105,7 @@ type CommandGetOptions struct { // global flags options.GlobalCommandOptions - // ClusterNamespace holds the namespace name where the member cluster objects are stored. + // ClusterNamespace holds the namespace name where the member cluster secrets are stored. ClusterNamespace string Clusters []string @@ -608,7 +608,7 @@ func (g *CommandGetOptions) watch(watchObjs []WatchObj) error { return nil } -//watchMultiClusterObj watch objects in multi clusters by goroutines +// watchMultiClusterObj watch objects in multi clusters by goroutines func (g *CommandGetOptions) watchMultiClusterObj(watchObjs []WatchObj, mapping *meta.RESTMapping, outputObjects *bool, printer printers.ResourcePrinterFunc) { var wg sync.WaitGroup diff --git a/pkg/karmadactl/join.go b/pkg/karmadactl/join.go index 80d971c63..790d47c0e 100644 --- a/pkg/karmadactl/join.go +++ b/pkg/karmadactl/join.go @@ -64,7 +64,7 @@ func joinExample(parentCommand string) string { type CommandJoinOption struct { options.GlobalCommandOptions - // ClusterNamespace holds the namespace name where the member cluster objects are stored. + // ClusterNamespace holds the namespace name where the member cluster secrets are stored. ClusterNamespace string // ClusterName is the cluster's name that we are going to join with. diff --git a/pkg/karmadactl/options/global.go b/pkg/karmadactl/options/global.go index 0c5fe174d..27101ea05 100644 --- a/pkg/karmadactl/options/global.go +++ b/pkg/karmadactl/options/global.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/pflag" ) -//DefaultKarmadaClusterNamespace defines the default namespace where the member cluster secrets are stored. +// DefaultKarmadaClusterNamespace defines the default namespace where the member cluster secrets are stored. const DefaultKarmadaClusterNamespace = "karmada-cluster" // DefaultKarmadactlCommandDuration defines the default timeout for karmadactl execute diff --git a/pkg/karmadactl/promote.go b/pkg/karmadactl/promote.go index cf9e09fea..5edc16b9f 100644 --- a/pkg/karmadactl/promote.go +++ b/pkg/karmadactl/promote.go @@ -95,7 +95,7 @@ type CommandPromoteOption struct { // Cluster is the name of legacy cluster Cluster string - // ClusterNamespace holds the namespace name where the member cluster objects are stored. + // ClusterNamespace holds the namespace name where the member cluster secrets are stored. ClusterNamespace string // Namespace is the namespace of legacy resource diff --git a/pkg/karmadactl/unjoin.go b/pkg/karmadactl/unjoin.go index ac50afa35..accee7548 100644 --- a/pkg/karmadactl/unjoin.go +++ b/pkg/karmadactl/unjoin.go @@ -73,7 +73,7 @@ func unjoinExample(parentCommand string) string { type CommandUnjoinOption struct { options.GlobalCommandOptions - // ClusterNamespace holds the namespace name where the member cluster objects are stored. + // ClusterNamespace holds namespace where the member cluster secrets are stored ClusterNamespace string // ClusterName is the cluster's name that we are going to join with.