devicetainteviction

package
v1.33.0 Latest Latest
Warning

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

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

Documentation

Overview

Package devicetainteviction contains the logic implementing taint-based eviction for Pods using tainted devices (https://github.com/kubernetes/enhancements/issues/5055).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller listens to Taint changes of DRA devices and Toleration changes of ResourceClaims, then deletes Pods which use ResourceClaims that don't tolerate a NoExecute taint. Pods which have already reached a final state (aka terminated) don't need to be deleted.

All of the logic which identifies pods which need to be evicted runs in the handle* event handlers. They don't call any blocking method. All the blocking calls happen in a tainteviction.TimedWorkerQueue, using the context passed to Run.

The resourceslicetracker takes care of applying taints defined in DeviceTaintRules to ResourceSlices. This controller here receives modified ResourceSlices with all applicable taints from that tracker and doesn't need to care about where a taint came from, the DRA driver or a DeviceTaintRule.

func New

New creates a new Controller that will use passed clientset to communicate with the API server. Spawns no goroutines. That happens in Run.

func (*Controller) Run

func (tc *Controller) Run(ctx context.Context) error

Run starts the controller which will run until the context is done. An error is returned for startup problems.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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