pod

package
v0.1.0-alpha.1....-9b31e75 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(client client.Client, scheme *runtime.Scheme, eventRecorder record.EventRecorder, expectationsStore *expect.ExpectationsStore) component.Operator[grovecorev1alpha1.PodClique]

New creates an instance of Pod components operator.

Types

type DeletionSorter

type DeletionSorter []*corev1.Pod

DeletionSorter enables sorting of a slice of Pods according to preference for deletion

func (DeletionSorter) Len

func (s DeletionSorter) Len() int

Len returns the length of the DeletionSorter

func (DeletionSorter) Less

func (s DeletionSorter) Less(i, j int) bool

Less compares two pods and returns true if the first one should be preferred for deletion. Code partially adapted from https://github.com/kubernetes/kubernetes/blob/5a450884b127f7b8e477d48cf3967a2a5eca9126/pkg/controller/controller_utils.go#L702 Only 4 conditions have been taken as is and used here.

func (DeletionSorter) Swap

func (s DeletionSorter) Swap(i, j int)

Swap swaps two elements in a DeletionSorter

Jump to

Keyboard shortcuts

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