Documentation ¶
Index ¶
- Constants
- func CompareEnv(c1, c2 corev1.Container) bool
- func CompareMap(exists map[string]string, new map[string]string) bool
- func ComparePVC(vc1, vc2 corev1.PersistentVolumeClaim) bool
- func CompareServicePorts(p1, p2 []corev1.ServicePort) bool
- func ConvertBool(flag bool) string
- func CountJobsWithOneCompletion(jobList []batchv1.Job) int
- func CountReadyPods(podList []corev1.Pod) int
- func FilterActivePods(pods []corev1.Pod) []corev1.Pod
- func FilterJobsWithOneCompletion(jobList []batchv1.Job) []batchv1.Job
- func Find[T comparable](s []T, cb func(e T) bool) *T
- func IsPodActive(p corev1.Pod) bool
- func IsPodAlive(p corev1.Pod) bool
- func IsPodEvicted(p *corev1.Pod) bool
- func IsPodReady(pod corev1.Pod) bool
- func IsPodRestart(pod corev1.Pod) bool
- func IsPodUnscheduled(p *corev1.Pod) bool
- func JobHasOneCompletion(job batchv1.Job) bool
- func MergeMap[K comparable, V comparable](m1 map[K]V, m2 ...map[K]V) map[K]V
- type PodStatus
Constants ¶
View Source
const ( // PodReasonEvicted is set inside the status as the Pod failure reason // when the Kubelet evicts a Pod PodReasonEvicted = "Evicted" )
Variables ¶
This section is empty.
Functions ¶
func CompareEnv ¶
func ComparePVC ¶
func ComparePVC(vc1, vc2 corev1.PersistentVolumeClaim) bool
func CompareServicePorts ¶
func CompareServicePorts(p1, p2 []corev1.ServicePort) bool
func ConvertBool ¶
func CountJobsWithOneCompletion ¶
CountJobsWithOneCompletion count the number complete jobs
func CountReadyPods ¶
CountReadyPods counts the number of Pods which are ready
func FilterActivePods ¶
FilterActivePods returns pods that have not terminated.
func FilterJobsWithOneCompletion ¶
FilterJobsWithOneCompletion returns jobs that have one completion
func Find ¶
func Find[T comparable](s []T, cb func(e T) bool) *T
func IsPodActive ¶
IsPodActive checks if a pod is active, copied from: https://github.com/kubernetes/kubernetes/blob/1bd0077/test/e2e/framework/pod/resource.go#L664
func IsPodAlive ¶
IsPodAlive check if a pod is active and not crash-looping
func IsPodEvicted ¶
IsPodEvicted checks if a pod has been evicted by the Kubelet
func IsPodRestart ¶
func IsPodUnscheduled ¶
IsPodUnscheduled check if a Pod is unscheduled
func JobHasOneCompletion ¶
JobHasOneCompletion Completion check if a certain job is complete
func MergeMap ¶
func MergeMap[K comparable, V comparable](m1 map[K]V, m2 ...map[K]V) map[K]V
Types ¶
Click to show internal directories.
Click to hide internal directories.