termination

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNodeDrainErr

func IsNodeDrainErr(err error) bool

func NewController

func NewController(clk clock.Clock, kubeClient client.Client, evictionQueue *EvictionQueue,
	recorder events.Recorder, cloudProvider cloudprovider.CloudProvider) corecontroller.Controller

NewController constructs a terminationController instance

Types

type Controller

type Controller struct {
	Terminator *Terminator
	KubeClient client.Client
	Recorder   events.Recorder
}

Controller for the resource

func (*Controller) Builder

func (*Controller) Finalize added in v0.22.1

func (c *Controller) Finalize(ctx context.Context, node *v1.Node) (reconcile.Result, error)

func (*Controller) Name

func (c *Controller) Name() string

func (*Controller) Reconcile

func (c *Controller) Reconcile(_ context.Context, _ *v1.Node) (reconcile.Result, error)

type EvictionQueue

type EvictionQueue struct {
	workqueue.RateLimitingInterface
	set.Set
	// contains filtered or unexported fields
}

func NewEvictionQueue

func NewEvictionQueue(ctx context.Context, coreV1Client corev1.CoreV1Interface, recorder events.Recorder) *EvictionQueue

func (*EvictionQueue) Add

func (e *EvictionQueue) Add(pods []*v1.Pod)

Add adds pods to the EvictionQueue

func (*EvictionQueue) Start

func (e *EvictionQueue) Start(ctx context.Context)

type NodeDrainErr

type NodeDrainErr error

type Terminator

type Terminator struct {
	EvictionQueue *EvictionQueue
	KubeClient    client.Client
	CloudProvider cloudprovider.CloudProvider
	Clock         clock.Clock
}

Jump to

Keyboard shortcuts

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