terminator

package
v0.0.0-...-d7985ca Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNodeDrainError

func IsNodeDrainError(err error) bool

Types

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 NodeDrainError

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

func NewNodeDrainError

func NewNodeDrainError(err error) *NodeDrainError

type Terminator

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

func NewTerminator

func NewTerminator(clk clock.Clock, kubeClient client.Client, cloudProvider cloudprovider.CloudProvider, eq *EvictionQueue) *Terminator

func (*Terminator) Cordon

func (t *Terminator) Cordon(ctx context.Context, node *v1.Node) error

Cordon cordons a node

func (*Terminator) Drain

func (t *Terminator) Drain(ctx context.Context, node *v1.Node) error

Drain evicts pods from the node and returns true when all pods are evicted https://kubernetes.io/docs/concepts/architecture/nodes/#graceful-node-shutdown

func (*Terminator) TerminateNode

func (t *Terminator) TerminateNode(ctx context.Context, node *v1.Node) error

TerminateNode calls cloud provider delete then removes the finalizer to delete the node

Jump to

Keyboard shortcuts

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