dev

package
v1.1.27 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 48 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 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
	NoProxy       bool
	ExtraCIDR     []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
	NetMode     opts.NetworkOpt
	//Aliases      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, 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