From 85a66c07149142fd4e052da3bd83f2d816d60adf Mon Sep 17 00:00:00 2001 From: Arjun Raja Yogidas Date: Tue, 29 Oct 2024 03:35:13 +0000 Subject: [PATCH] fix: add persistent flags to root finch command Signed-off-by: Arjun Raja Yogidas --- cmd/finch/main_native.go | 3 +++ cmd/finch/main_remote.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cmd/finch/main_native.go b/cmd/finch/main_native.go index 91c289e47..14a3c18f5 100644 --- a/cmd/finch/main_native.go +++ b/cmd/finch/main_native.go @@ -79,6 +79,9 @@ var newApp = func( // TODO: Decide when to forward --debug to the dependencies // (e.g. nerdctl for container commands and limactl for VM commands). rootCmd.PersistentFlags().Bool("debug", false, "running under debug mode") + rootCmd.PersistentFlags().String("namespace", "", `containerd namespace, such as "moby" for Docker, "k8s.io" for Kubernetes`) + rootCmd.PersistentFlags().String("cgroup-manager", "", `Cgroup manager to use ("cgroupfs"|"systemd")`) + rootCmd.PersistentFlags().String("snapshotter", "", "containerd snapshotter") rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error { // running commands under debug mode will print out debug logs debugMode, _ := cmd.Flags().GetBool("debug") diff --git a/cmd/finch/main_remote.go b/cmd/finch/main_remote.go index 4e23400bb..5e170127a 100644 --- a/cmd/finch/main_remote.go +++ b/cmd/finch/main_remote.go @@ -89,6 +89,9 @@ var newApp = func( // TODO: Decide when to forward --debug to the dependencies // (e.g. nerdctl for container commands and limactl for VM commands). rootCmd.PersistentFlags().Bool("debug", false, "running under debug mode") + rootCmd.PersistentFlags().String("namespace", "", `containerd namespace, such as "moby" for Docker, "k8s.io" for Kubernetes`) + rootCmd.PersistentFlags().String("cgroup-manager", "", `Cgroup manager to use ("cgroupfs"|"systemd")`) + rootCmd.PersistentFlags().String("snapshotter", "", "containerd snapshotter") rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error { // running commands under debug mode will print out debug logs debugMode, _ := cmd.Flags().GetBool("debug")