pod

package
v0.1.0-alpha.12-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 36 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, schedRegistry scheduler.Registry) component.Operator[grovecorev1alpha1.PodClique]

New creates a new Pod operator for managing Pod resources within PodCliques

Types

type DeletionSorter

type DeletionSorter struct {
	Pods []*corev1.Pod
	// ExpectedPodTemplateHash is the hash that is expected as a label on the updated pods
	ExpectedPodTemplateHash string
}

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