pdb

package
v0.0.0-...-30e57c9 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBasicRemainingPdbTracker

func NewBasicRemainingPdbTracker() *basicRemainingPdbTracker

NewBasicRemainingPdbTracker returns a new instance of basicRemainingPdbTracker

Types

type RemainingPdbTracker

type RemainingPdbTracker interface {
	// SetPdbs sets PDBs of the remaining PDB tracker.
	SetPdbs(pdbs []*policyv1.PodDisruptionBudget) error
	// GetPdbs returns the current remaining PDBs.
	GetPdbs() []*policyv1.PodDisruptionBudget
	// MatchingPdbs returns all PDBs matching the pod.
	MatchingPdbs(pod *apiv1.Pod) []*policyv1.PodDisruptionBudget

	// CanRemovePods checks if the set of pods can be removed.
	// inParallel indicates if the pods can be removed in parallel. If it is false
	// then evicting pods could fail due to drain timeout.
	CanRemovePods(pods []*apiv1.Pod) (canRemove, inParallel bool, blockingPod *drain.BlockingPod)
	// RemovePods updates the remaining PDBs after pod removal.
	RemovePods(pods []*apiv1.Pod)

	// Clear resets the remaining PDB tracker to empty state.
	Clear()
}

RemainingPdbTracker is responsible for tracking the remaining PDBs

Jump to

Keyboard shortcuts

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