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 ¶
func New(c clientset.Interface, podInformer coreinformers.PodInformer, claimInformer resourceinformers.ResourceClaimInformer, sliceInformer resourceinformers.ResourceSliceInformer, taintInformer resourcealphainformers.DeviceTaintRuleInformer, classInformer resourceinformers.DeviceClassInformer, controllerName string) *Controller
New creates a new Controller that will use passed clientset to communicate with the API server. Spawns no goroutines. That happens in Run.