container

package
v0.17.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cli.Command{
	Name:  "container",
	Usage: "run cluster container",

	Flags: []cli.Flag{
		app.NamespaceFlag,

		&cli.StringFlag{
			Name:  "image",
			Usage: "container image to start",
		},

		app.PortsFlag,
	},

	Action: func(ctx context.Context, cmd *cli.Command) error {
		client := app.MustClient(ctx, cmd)

		path, err := os.Getwd()

		if err != nil {
			return err
		}

		image := cmd.String("image")
		namespace := app.Namespace(ctx, cmd)

		if image == "" {
			image = "debian"
		}

		if namespace == "" {
			namespace = client.Namespace()
		}

		tunnels, _ := app.Ports(ctx, cmd)

		return Run(ctx, client, namespace, image, true, true, path, tunnels)
	},
}

Functions

func Run added in v0.16.4

func Run(ctx context.Context, client kubernetes.Client, namespace, image string, stdin, tty bool, path string, ports map[int]int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL