Removed flags without implementation (#38)

This commit is contained in:
nimrod-up9
2021-05-09 14:09:39 +03:00
committed by GitHub
parent c3d0941d9c
commit ee63247888
3 changed files with 1 additions and 7 deletions

View File

@@ -31,11 +31,8 @@ var tapCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(tapCmd)
// tapCmd.Flags().BoolVarP(&config.Configuration.Quiet, "quiet", "q", false, "No stdout output")
tapCmd.Flags().BoolVarP(&config.Configuration.NoGUI, "no-gui", "", false, "Do not open web interface")
tapCmd.Flags().Uint16VarP(&config.Configuration.GuiPort, "gui-port", "p", 8899, "Provide a custom port for the web interface webserver")
tapCmd.Flags().StringVarP(&config.Configuration.Namespace, "namespace", "n", "", "Namespace selector")
// tapCmd.Flags().BoolVarP(&config.Configuration.AllNamespaces, "all-namespaces", "A", false, "Select all namespaces")
tapCmd.Flags().StringVarP(&config.Configuration.KubeConfigPath, "kubeconfig", "k", "", "Path to kubeconfig file")
tapCmd.Flags().StringVarP(&config.Configuration.MizuImage, "mizu-image", "", "gcr.io/up9-docker-hub/mizu/develop:latest", "Custom image for mizu collector")
tapCmd.Flags().Uint16VarP(&config.Configuration.MizuPodPort, "mizu-port", "", 8899, "Port which mizu cli will attempt to forward from the mizu collector pod")

View File

@@ -1,7 +1,6 @@
package config
type Options struct {
NoGUI bool
GuiPort uint16
Namespace string
KubeConfigPath string

View File

@@ -76,9 +76,7 @@ func createPodAndPortForward(ctx context.Context, kubernetesProvider *kubernetes
isPodReady = true
var err error
portForward, err = kubernetes.NewPortForward(kubernetesProvider, kubernetesProvider.Namespace, podName, config.Configuration.GuiPort, config.Configuration.MizuPodPort, cancel)
if !config.Configuration.NoGUI {
fmt.Printf("Web interface is now available at http://localhost:%d\n", config.Configuration.GuiPort)
}
fmt.Printf("Web interface is now available at http://localhost:%d\n", config.Configuration.GuiPort)
if err != nil {
fmt.Printf("error forwarding port to pod %s\n", err)
cancel()