Merge pull request #2193 from carlory/fix-karmadactldescribe
remove unused flag for karmadactl promote
This commit is contained in:
commit
fa4fecaa24
|
@ -95,9 +95,6 @@ type CommandPromoteOption struct {
|
|||
// Cluster is the name of legacy cluster
|
||||
Cluster string
|
||||
|
||||
// ClusterNamespace holds the namespace name where the member cluster secrets are stored.
|
||||
ClusterNamespace string
|
||||
|
||||
// Namespace is the namespace of legacy resource
|
||||
Namespace string
|
||||
|
||||
|
@ -129,7 +126,6 @@ func (o *CommandPromoteOption) AddFlags(flags *pflag.FlagSet) {
|
|||
|
||||
flags.StringVarP(&o.Namespace, "namespace", "n", "default", "-n=namespace or -n namespace")
|
||||
flags.StringVarP(&o.Cluster, "cluster", "C", "", "the name of legacy cluster (eg -C=member1)")
|
||||
flags.StringVar(&o.ClusterNamespace, "cluster-namespace", options.DefaultKarmadaClusterNamespace, "Namespace in the control plane where member cluster secrets are stored.")
|
||||
flags.StringVar(&o.ClusterContext, "cluster-context", "",
|
||||
"Context name of legacy cluster in kubeconfig. Only works when there are multiple contexts in the kubeconfig.")
|
||||
flags.StringVar(&o.ClusterKubeConfig, "cluster-kubeconfig", "",
|
||||
|
|
|
@ -85,7 +85,6 @@ var _ = ginkgo.Describe("Karmadactl promote testing", func() {
|
|||
ginkgo.By(fmt.Sprintf("Promoting namespace %s from member: %s to karmada control plane", deploymentNamespace, member1), func() {
|
||||
namespaceOpts = karmadactl.CommandPromoteOption{
|
||||
Cluster: member1,
|
||||
ClusterNamespace: options.DefaultKarmadaClusterNamespace,
|
||||
}
|
||||
args := []string{"namespace", deploymentNamespace}
|
||||
// init args: place namespace name to CommandPromoteOption.name
|
||||
|
@ -104,7 +103,6 @@ var _ = ginkgo.Describe("Karmadactl promote testing", func() {
|
|||
deploymentOpts = karmadactl.CommandPromoteOption{
|
||||
Namespace: deploymentNamespace,
|
||||
Cluster: member1,
|
||||
ClusterNamespace: options.DefaultKarmadaClusterNamespace,
|
||||
}
|
||||
args := []string{"deployment", deploymentName}
|
||||
// init args: place deployment name to CommandPromoteOption.name
|
||||
|
@ -193,7 +191,6 @@ var _ = ginkgo.Describe("Karmadactl promote testing", func() {
|
|||
ginkgo.By(fmt.Sprintf("Promoting clusterrole %s and clusterrolebindings %s from member to karmada", clusterRoleName, clusterRoleBindingName), func() {
|
||||
clusterRoleOpts = karmadactl.CommandPromoteOption{
|
||||
Cluster: member1,
|
||||
ClusterNamespace: options.DefaultKarmadaClusterNamespace,
|
||||
}
|
||||
|
||||
args := []string{"clusterrole", clusterRoleName}
|
||||
|
@ -207,7 +204,6 @@ var _ = ginkgo.Describe("Karmadactl promote testing", func() {
|
|||
|
||||
clusterRoleBindingOpts = karmadactl.CommandPromoteOption{
|
||||
Cluster: member1,
|
||||
ClusterNamespace: options.DefaultKarmadaClusterNamespace,
|
||||
}
|
||||
|
||||
args = []string{"clusterrolebinding", clusterRoleBindingName}
|
||||
|
@ -260,7 +256,6 @@ var _ = ginkgo.Describe("Karmadactl promote testing", func() {
|
|||
ginkgo.By(fmt.Sprintf("Promoting namespace %s from member: %s to karmada control plane", serviceNamespace, member1), func() {
|
||||
opts := karmadactl.CommandPromoteOption{
|
||||
Cluster: member1,
|
||||
ClusterNamespace: options.DefaultKarmadaClusterNamespace,
|
||||
}
|
||||
args := []string{"namespace", serviceNamespace}
|
||||
err := opts.Complete(args)
|
||||
|
@ -276,7 +271,6 @@ var _ = ginkgo.Describe("Karmadactl promote testing", func() {
|
|||
opts := karmadactl.CommandPromoteOption{
|
||||
Namespace: serviceNamespace,
|
||||
Cluster: member1,
|
||||
ClusterNamespace: options.DefaultKarmadaClusterNamespace,
|
||||
}
|
||||
args := []string{"service", serviceName}
|
||||
err := opts.Complete(args)
|
||||
|
|
Loading…
Reference in New Issue