Skip to content

Commit

Permalink
Merge pull request #89 from fuweid/fix-vc-issue
Browse files Browse the repository at this point in the history
bugfix: virtualcluster/nodepool should read global flag
  • Loading branch information
fuweid authored Feb 7, 2024
2 parents 5ad18fe + c9289d7 commit 476f96d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/kperf/commands/virtualcluster/nodepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var nodepoolAddCommand = cli.Command{
return fmt.Errorf("required non-empty nodepool name")
}

kubeCfgPath := cliCtx.String("kubeconfig")
kubeCfgPath := cliCtx.GlobalString("kubeconfig")

affinityLabels, err := utils.KeyValuesMap(cliCtx.StringSlice("affinity"))
if err != nil {
Expand Down Expand Up @@ -103,7 +103,7 @@ var nodepoolDelCommand = cli.Command{
return fmt.Errorf("required non-empty nodepool name")
}

kubeCfgPath := cliCtx.String("kubeconfig")
kubeCfgPath := cliCtx.GlobalString("kubeconfig")

return virtualcluster.DeleteNodepool(context.Background(), kubeCfgPath, nodepoolName)
},
Expand All @@ -113,7 +113,7 @@ var nodepoolListCommand = cli.Command{
Name: "list",
Usage: "List virtual node pools",
Action: func(cliCtx *cli.Context) error {
kubeCfgPath := cliCtx.String("kubeconfig")
kubeCfgPath := cliCtx.GlobalString("kubeconfig")
nodepools, err := virtualcluster.ListNodepools(context.Background(), kubeCfgPath)
if err != nil {
return err
Expand Down

0 comments on commit 476f96d

Please sign in to comment.