podutils

package
v1.3.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CondemnSettleWindow = 1 * time.Minute

CondemnSettleWindow is the minimum duration a newly condemned pod must remain condemned before its drained deadline is trusted for candidate evaluation.

This value needs to be greater than or equal to the async cache refresh frequency.

Variables

This section is empty.

Functions

func IsCreated

func IsCreated(pod *corev1.Pod) bool

isCreated returns true if pod has been created and is maintained by the API server

func IsFailed

func IsFailed(pod *corev1.Pod) bool

isFailed returns true if pod has a Phase of PodFailed

func IsHealthy

func IsHealthy(pod *corev1.Pod) bool

isHealthy returns true if pod is running and ready and has not been terminated

func IsPending

func IsPending(pod *corev1.Pod) bool

isPending returns true if pod has a Phase of PodPending

func IsPodCondemned added in v1.3.0

func IsPodCondemned(pod *corev1.Pod) bool

IsPodCondemned returns true if the pod is marked as a scale-in / rolling-update deletion candidate (either as a boolean "true" or as an RFC3339 timestamp).

func IsPodCondemnedSettled added in v1.3.0

func IsPodCondemnedSettled(pod *corev1.Pod, now time.Time) bool

IsPodCondemnedSettled returns true if the pod is condemned and at least CondemnSettleWindow has elapsed since it was condemned (or the annotation is set to "true").

func IsPodCordon

func IsPodCordon(pod *corev1.Pod) bool

IsPodCordon returns true if and only if the cordon annotation is set to true.

func IsPodCordonRequested added in v1.3.0

func IsPodCordonRequested(pod *corev1.Pod) bool

IsPodCordonRequested returns true if and only if the cordon-requested annotation is set to true.

func IsRunning

func IsRunning(pod *corev1.Pod) bool

isRunning returns true if pod is in the PodRunning Phase.

func IsRunningAndAvailable

func IsRunningAndAvailable(pod *corev1.Pod, minReadySeconds int32) bool

func IsRunningAndReady

func IsRunningAndReady(pod *corev1.Pod) bool

isRunningAndReady returns true if pod is in the PodRunning Phase, if it has a condition of PodReady.

func IsSucceeded

func IsSucceeded(pod *corev1.Pod) bool

isSucceeded returns true if pod has a Phase of PodSucceeded

func IsTerminating

func IsTerminating(pod *corev1.Pod) bool

isTerminating returns true if pod's DeletionTimestamp has been set

Types

This section is empty.

Jump to

Keyboard shortcuts

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