Skip to content

Commit

Permalink
Merge pull request #5 from juicedata/fix_mount_ns
Browse files Browse the repository at this point in the history
fix mount namespace init
  • Loading branch information
zwwhdls committed Jul 5, 2024
2 parents d071383 + 5ea4ec4 commit d97cdee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/tools/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ import (
"k8s.io/cli-runtime/pkg/genericclioptions"

"github.com/juicedata/kubectl-jfs-plugin/pkg"
"github.com/juicedata/kubectl-jfs-plugin/pkg/config"
)

var (
KubernetesConfigFlags *genericclioptions.ConfigFlags
MountNamespace string
)

func init() {
KubernetesConfigFlags = genericclioptions.NewConfigFlags(true)
RootCmd.PersistentFlags().StringVarP(&MountNamespace, "mount-namespace", "m", "kube-system", "namespace of juicefs csi driver")
RootCmd.PersistentFlags().StringVarP(&config.MountNamespace, "mount-namespace", "m", "kube-system", "namespace of juicefs csi driver")
KubernetesConfigFlags.AddFlags(RootCmd.PersistentFlags())
}

Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/juicedata/kubectl-jfs-plugin

go 1.22
go 1.22.0

toolchain go1.22.3

require (
github.com/spf13/cobra v1.8.1
Expand Down

0 comments on commit d97cdee

Please sign in to comment.