dev

package
v1.1.30 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 59 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoDev

func DoDev(devOptions Options, args []string, 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

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

func TransferImage

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 ConnectMode

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

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

	// docker options
	Platform string
	//Pull         string // always, missing, never
	PublishAll   bool
	Entrypoint   string
	DockerImage  string
	Publish      opts.ListOpts
	Expose       opts.ListOpts
	ExtraHosts   opts.ListOpts
	NetMode      opts.NetworkOpt
	Env          opts.ListOpts
	Mounts       opts.MountOpt
	Volumes      opts.ListOpts
	VolumeDriver string
}

func (Options) Main

func (d Options) Main(ctx context.Context) error

type Run

type Run []*RunConfig

func ConvertKubeResourceToContainer

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

func (Run) Remove

func (r Run) Remove(ctx context.Context) error

func (Run) Run

func (r Run) Run(ctx context.Context, volume map[string][]mount.Mount) error

type RunConfig

type RunConfig struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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