pod

package
v0.8.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImages added in v0.3.0

func GetImages(spec core.PodSpec) (images []string)

GetImages gets a slice of images for the specified PodSpec.

func GetTerminatedContainersStatusesByPod added in v0.3.0

func GetTerminatedContainersStatusesByPod(pod *core.Pod) map[string]*core.ContainerStateTerminated

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewPodManager

func NewPodManager(clientset kubernetes.Interface) *Manager

func (*Manager) GetContainerLogsByJob added in v0.2.2

func (pw *Manager) GetContainerLogsByJob(ctx context.Context, job *batch.Job, container string) (io.ReadCloser, error)

func (*Manager) GetPodByJob

func (pw *Manager) GetPodByJob(ctx context.Context, job *batch.Job) (*core.Pod, error)

GetPodByJob gets the Pod controller by the specified Job.

func (*Manager) GetPodByName

func (pw *Manager) GetPodByName(ctx context.Context, namespace, name string) (*core.Pod, error)

func (*Manager) GetPodLogs

func (pw *Manager) GetPodLogs(ctx context.Context, pod *core.Pod, container string) (io.ReadCloser, error)

func (*Manager) GetPodSpecByWorkload

func (pw *Manager) GetPodSpecByWorkload(ctx context.Context, workload kube.Object) (spec core.PodSpec, object meta.Object, err error)

GetPodSpecByWorkload returns a PodSpec of the specified Workload.

func (*Manager) GetTerminatedContainersStatusesByJob added in v0.2.2

func (pw *Manager) GetTerminatedContainersStatusesByJob(ctx context.Context, job *batch.Job) (statuses map[string]*core.ContainerStateTerminated, err error)

func (*Manager) LogRunnerErrors added in v0.2.2

func (pw *Manager) LogRunnerErrors(ctx context.Context, job *batch.Job)

TODO Consider moving this generic code to kube.runnableJob and call it in case of failure

Jump to

Keyboard shortcuts

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