dev

package
v1.1.36 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT, Apache-2.0 Imports: 71 Imported by: 1

Documentation

Index

Constants

View Source
const (
	PullImageAlways  = "always"
	PullImageMissing = "missing" // Default (matches previous behavior)
	PullImageNever   = "never"
)

Pull constants

Variables

This section is empty.

Functions

func DoDev added in v1.1.29

func DoDev(devOptions *Options, flags *pflag.FlagSet, f cmdutil.Factory) error

func GetClient

func GetClient() (*client.Client, *command.DockerCli, error)

func GetDNS

func GetDNS(ctx context.Context, f util.Factory, ns, pod string) (*miekgdns.ClientConfig, error)

func GetVolume

func GetVolume(ctx context.Context, f util.Factory, ns, pod string) (map[string][]mount.Mount, error)

GetVolume key format: [container name]-[volume mount name]

func PullImage added in v1.1.30

func PullImage(ctx context.Context, platform *v12.Platform, cli *client.Client, c *command.DockerCli, img string) error

func TransferImage added in v1.1.30

func TransferImage(ctx context.Context, conf *util.SshConfig) error

TransferImage 1) if not special ssh config, just pull image and tag and push 2) if special ssh config, pull image, tag image, save image and scp image to remote, load image and push

Types

type ConfigList added in v1.1.32

type ConfigList []*RunConfig

func ConvertKubeResourceToContainer

func ConvertKubeResourceToContainer(namespace string, temp v1.PodTemplateSpec, envMap map[string][]string, mountVolume map[string][]mount.Mount, dnsConfig *miekgdns.ClientConfig) (runConfigList ConfigList)

func (ConfigList) Remove added in v1.1.32

func (l ConfigList) Remove(ctx context.Context, cli *client.Client) error

func (ConfigList) Run added in v1.1.32

func (l ConfigList) Run(ctx context.Context, volume map[string][]mount.Mount, cli *client.Client, dockerCli *command.DockerCli) error

type ConnectMode added in v1.1.29

type ConnectMode string
const (
	ConnectModeContainer ConnectMode = "container"
	ConnectModeHost      ConnectMode = "host"
)

type ContainerOptions added in v1.1.32

type ContainerOptions struct {
	Image string
	Args  []string
	// contains filtered or unexported fields
}

ContainerOptions is a data object with all the options for creating a container

func AddFlags added in v1.1.32

func AddFlags(flags *pflag.FlagSet) *ContainerOptions

AddFlags adds all command line flags that will be used by parse to the FlagSet

type Options

type Options struct {
	Headers       map[string]string
	Namespace     string
	Workload      string
	Factory       cmdutil.Factory
	ContainerName string
	NoProxy       bool
	ExtraCIDR     []string
	ExtraDomain   []string
	ConnectMode   ConnectMode
	Engine        config.Engine

	// docker options
	DockerImage string
	Options     RunOptions
	Copts       *ContainerOptions
}

func (*Options) Main

func (d *Options) Main(ctx context.Context, cli *client.Client, dockerCli *command.DockerCli, tempContainerConfig *containerConfig) error

type RunConfig

type RunConfig struct {
	Options RunOptions
	Copts   *ContainerOptions
	// contains filtered or unexported fields
}

type RunOptions added in v1.1.32

type RunOptions struct {
	Detach bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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