pods

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 20 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(ctx context.Context, 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

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