Documentation ¶
Index ¶
- func GroupStatefulSetsByLabel(sets []*v1.StatefulSet, label string) map[string][]*v1.StatefulSet
- func IsPodRunningAndReady(pod *corev1.Pod) bool
- func MoveStatefulSetToFront(sets []*v1.StatefulSet, toMove *v1.StatefulSet) []*v1.StatefulSet
- func MustNewLabelsRequirement(key string, op selection.Operator, vals []string) labels.Requirement
- func Now() *metav1.Time
- func PodNames(pods []*corev1.Pod) []string
- func SortPods(pods []*corev1.Pod)
- func SortStatefulSets(sets []*v1.StatefulSet)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GroupStatefulSetsByLabel ¶
func GroupStatefulSetsByLabel(sets []*v1.StatefulSet, label string) map[string][]*v1.StatefulSet
GroupStatefulSetsByLabel returns a map containing the input StatefulSets grouped by the input label's value.
func IsPodRunningAndReady ¶
IsPodRunningAndReady returns whether the input pod is running and ready.
func MoveStatefulSetToFront ¶
func MoveStatefulSetToFront(sets []*v1.StatefulSet, toMove *v1.StatefulSet) []*v1.StatefulSet
MoveStatefulSetToFront returns a new slice where the input StatefulSet toMove is moved to the beginning. Comparison is done via pointer equality.
func MustNewLabelsRequirement ¶
MustNewLabelsRequirement wraps labels.NewRequirement() and panics on error. This utility function can be safely used whenever the input is deterministic (eg. based on hard-coded config).
func SortPods ¶
SortPods sorts in-place the provided slice of Pod. Pod names are sorted in natural order in order to play nicely with StatefulSet naming schema.
func SortStatefulSets ¶
func SortStatefulSets(sets []*v1.StatefulSet)
SortStatefulSets sorts in-place the provided slice of StatefulSet.
Types ¶
This section is empty.