Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Command = &cli.Command{ Name: "catapult", Usage: "connect Kubernetes services", Category: app.CategoryCluster, Flags: []cli.Flag{ app.ScopeFlag, app.NamespaceFlag, }, Action: func(c *cli.Context) error { client := app.MustClient(c) scope := app.Scope(c) namespace := app.Namespace(c) elevated, err := system.IsElevated() if err != nil { return err } if !elevated { args := []string{ os.Args[0], "catapult", } if namespace != "" { args = append(args, "--"+app.NamespaceFlag.Name, namespace) } if scope != "" { args = append(args, "--"+app.ScopeFlag.Name, scope) } 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.