k8sconv

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Converts Kubernetes data models into our own internal data models.

(package name loosely inspired by strconv)

Index

Constants

This section is empty.

Variables

View Source
var ErrorWaitingReasons = map[string]bool{
	"CrashLoopBackOff":  true,
	"ErrImagePull":      true,
	"ImagePullBackOff":  true,
	"RunContainerError": true,
	"StartError":        true,
	"Error":             true,
}

Functions

func ContainerForStatus

func ContainerForStatus(ctx context.Context, pod *v1.Pod, cStatus v1.ContainerStatus) (store.Container, error)

Convert a Kubernetes Pod and ContainerStatus into a simpler Container model to store in the engine state.

func ContainerStatusToRuntimeState

func ContainerStatusToRuntimeState(status v1.ContainerStatus) model.RuntimeStatus

func PodContainers

func PodContainers(ctx context.Context, pod *v1.Pod, containerStatuses []v1.ContainerStatus) []store.Container

Convert a Kubernetes Pod into a list if simpler Container models to store in the engine state.

Types

This section is empty.

Jump to

Keyboard shortcuts

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