pod

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(k kubectl.CLI, hash string, out *output.Interface) error

Delete deletes the pod associated with a hash, if any

func DeleteAll

func DeleteAll(k kubectl.CLI, allNamespaces bool, out *output.Interface) error

DeleteAll deletes all pods associated with hashes

func Exec added in v0.6.0

func Exec(k kubectl.CLI, hash string, container string, prekill []string, forward []string, stdin bool, tty bool, command ...string) error

Exec executes a command in an existing pod associated with a hash

func Name

func Name(hash string) string

Name gets the name of the pod associated with a hash

Types

type Config added in v0.6.0

type Config struct {
	InheritKind        string
	InheritName        string
	InheritLabels      bool
	InheritAnnotations bool
	Labels             map[string]*string
	Annotations        map[string]*string
	Spec               map[string]interface{}
	ContainerSpec      map[string]interface{}
	Container          string
	Image              string
	Env                map[string]*string
	NoLifecycle        bool
	NoProbes           bool
	Replace            bool
	Stdin              bool
	TTY                bool
	Command            []string
	Detach             bool
}

Config represents configuration settings for a pod

type Process

type Process struct {
	Pod       string
	Container string
	// contains filtered or unexported fields
}

Process represents the main process in a container

func Apply

func Apply(k kubectl.CLI, hash string, config *Config, build func(pod string) error, out *output.Interface) (*Process, error)

Apply creates or replaces a pod associated with a hash

func (*Process) ExitCode

func (p *Process) ExitCode() (int, error)

ExitCode waits for the process to complete and gets its exit code

func (*Process) Exited

func (p *Process) Exited() bool

Exited indicates if the process has exited

Jump to

Keyboard shortcuts

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