Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "catapult", Usage: "connect Kubernetes services", Flags: []cli.Flag{ app.ScopeFlag, app.NamespaceFlag, app.KubeconfigFlag, }, Action: func(c *cli.Context) error { client := app.MustClient(c) scope := app.Scope(c) namespace := app.Namespace(c) if namespace == nil { namespace = to.StringPtr(client.Namespace()) } if scope == nil { scope = namespace } elevated, err := system.IsElevated() if err != nil { return err } if !elevated { args := []string{ os.Args[0], "catapult", } if namespace != nil && len(*namespace) > 0 { args = append(args, "--"+app.NamespaceFlag.Name, *namespace) } if scope != nil && len(*scope) > 0 { args = append(args, "--"+app.ScopeFlag.Name, *scope) } args = append(args, "--kubeconfig", client.ConfigPath()) os.Args = args if err := system.RunElevated(); err != nil { cli.Fatal("This command must be run as root!") } os.Exit(0) } return startCatapult(c.Context, client, *namespace, *scope) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.