pods

package
v0.14.0-m1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidScheduling schedulingType = iota
	GatewayNode
	NonGatewayNode
	CustomNode
)
View Source
const (
	HostNetworking networkingType = true
	PodNetworking  networkingType = false
)

Variables

This section is empty.

Functions

func ExecWithOptions

func ExecWithOptions(config ExecConfig, options *ExecOptions) (string, string, error)

ExecWithOptions executes a command in the specified container, returning stdout, stderr and error. `options` allowed for additional parameters to be passed.

func ScheduleAndAwaitCompletion

func ScheduleAndAwaitCompletion(config *Config) (string, error)

Types

type Config

type Config struct {
	Name                string
	ClientSet           kubernetes.Interface
	Scheduling          Scheduling
	Namespace           string
	Command             string
	Timeout             uint
	ImageRepositoryInfo image.RepositoryInfo
}

type ExecConfig

type ExecConfig struct {
	RestConfig *rest.Config
	ClientSet  kubernetes.Interface
}

type ExecOptions

type ExecOptions struct {
	Command       []string
	Namespace     string
	PodName       string
	ContainerName string
	Stdin         io.Reader
	CaptureStdout bool
	CaptureStderr bool
	// If false, whitespace in std{err,out} will be removed.
	PreserveWhitespace bool
	Quiet              bool
}

func ExecOptionsFromPod

func ExecOptionsFromPod(pod *v1.Pod) ExecOptions

type Scheduled

type Scheduled struct {
	Pod       *v1.Pod
	Config    *Config
	PodOutput string
}

func Schedule

func Schedule(config *Config) (*Scheduled, error)

func (*Scheduled) AwaitCompletion

func (np *Scheduled) AwaitCompletion() error

nolint:wrapcheck // No need to wrap errors here.

func (*Scheduled) Delete

func (np *Scheduled) Delete()

type Scheduling

type Scheduling struct {
	ScheduleOn schedulingType
	NodeName   string
	Networking networkingType
}

Jump to

Keyboard shortcuts

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