podutil

package
v0.0.0-...-86d6279 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodImages

func GetPodImages(spec corev1.PodSpec) []string

func GetPodReadyContainers

func GetPodReadyContainers(pod *corev1.Pod) []string

func GetPodRestartCount

func GetPodRestartCount(pod *corev1.Pod) int32

func GetPodStatus

func GetPodStatus(pod *corev1.Pod) corev1.PodPhase

GetPodStatus returns status string calculated based on the same logic as kubectl code: https://github.com/kubernetes/kubernetes/blob/master/pkg/printers/internalversion/printers.go#L734

func GetPodsTotalRequestsAndLimits

func GetPodsTotalRequestsAndLimits(podList *corev1.PodList) (reqs map[corev1.ResourceName]resource.Quantity, limits map[corev1.ResourceName]resource.Quantity)

GetPodsTotalRequestsAndLimits returns a dictionary of all defined resources summed up for all pods.

func IsPodReady

func IsPodReady(pod corev1.Pod) bool

func PodRequestsAndLimits

func PodRequestsAndLimits(pod *corev1.Pod) (reqs, limits corev1.ResourceList)

PodRequestsAndLimits returns a dictionary of all defined resources summed up for all containers of the pod. If pod overhead is non-nil, the pod overhead is added to the total container resource requests and to the total container limits which have a non-zero quantity.

func WaitForPodRunning

func WaitForPodRunning(ctx context.Context, c kubernetes.Interface, namespace, name, resourceVersion string, timeout time.Duration) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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