package podutils
import "k8s.io/kubernetes/pkg/kubectl/util/podutils"
Index ¶
- func IsPodAvailable(pod *corev1.Pod, minReadySeconds int32, now metav1.Time) bool
- func IsPodReady(pod *corev1.Pod) bool
- type ActivePods
- func (s ActivePods) Len() int
- func (s ActivePods) Less(i, j int) bool
- func (s ActivePods) Swap(i, j int)
- type ByLogging
Functions ¶
func IsPodAvailable ¶
IsPodAvailable returns true if a pod is available; false otherwise. Precondition for an available pod is that it must be ready. On top of that, there are two cases when a pod can be considered available: 1. minReadySeconds == 0, or 2. LastTransitionTime (is set) + minReadySeconds < current time
func IsPodReady ¶
IsPodReady returns true if a pod is ready; false otherwise.
Types ¶
type ActivePods ¶
ActivePods type allows custom sorting of pods so a controller can pick the best ones to delete.
func (ActivePods) Len ¶
func (s ActivePods) Len() int
func (ActivePods) Less ¶
func (s ActivePods) Less(i, j int) bool
func (ActivePods) Swap ¶
func (s ActivePods) Swap(i, j int)
type ByLogging ¶
ByLogging allows custom sorting of pods so the best one can be picked for getting its logs.
func (ByLogging) Len ¶
func (ByLogging) Less ¶
func (ByLogging) Swap ¶
Source Files ¶
podutils.go
- Version
- v1.14.0-alpha.2
- Published
- Jan 29, 2019
- Platform
- js/wasm
- Imports
- 4 packages
- Last checked
- 1 minute ago –
Tools for package owners.