dev

package
v1.1.19 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 46 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 GetEnv

func GetEnv(ctx context.Context, f util.Factory, ns, pod string) (map[string][]string, 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]

Types

type Options

type Options struct {
	Headers       map[string]string
	Namespace     string
	Workload      string
	Factory       cmdutil.Factory
	ContainerName string

	// docker options
	Platform string
	//Pull         string // always, missing, never
	PublishAll   bool
	Entrypoint   string
	DockerImage  string
	Publish      opts.ListOpts
	Expose       opts.ListOpts
	ExtraHosts   opts.ListOpts
	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) 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