pod

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddLWSVariables added in v0.3.0

func AddLWSVariables(pod *corev1.Pod) error

AddLWSVariables adds environment variable to every container.

func ContainerRestarted

func ContainerRestarted(pod corev1.Pod) bool

ContainerRestarted return true when there is any container in the pod that gets restarted

func GetPodCondition added in v0.4.0

func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)

GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.

func GetPodConditionFromList added in v0.4.0

func GetPodConditionFromList(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)

GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Returns -1 and nil if the condition is not present.

func GetPodReadyCondition added in v0.4.0

func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition

GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.

func IsPodReady added in v0.4.0

func IsPodReady(pod *corev1.Pod) bool

IsPodReady returns true if a pod is ready; false otherwise.

func IsPodReadyConditionTrue added in v0.4.0

func IsPodReadyConditionTrue(status corev1.PodStatus) bool

IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.

func LeaderPod

func LeaderPod(pod corev1.Pod) bool

LeaderPod check is the pod is a leader pod

func PodDeleted

func PodDeleted(pod corev1.Pod) bool

PodDeleted checks if the worker pod has been deleted

func PodRunningAndReady

func PodRunningAndReady(pod corev1.Pod) bool

PodRunningAndReady checks if the pod condition is running and marked as ready.

Types

This section is empty.

Jump to

Keyboard shortcuts

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