drain

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Client kubernetes.Interface
	Logger *logrus.Logger
}

Config configures a Drainer.

type Drainer

type Drainer interface {
	// Drain cordons a node and evicts its Pods.
	Drain(ctx context.Context, node string) error
	// Cordon marks a Kubernetes Node as unschedulable.
	Cordon(ctx context.Context, node string) error
	// Uncordon marks a Kubernetes Node as schedulable.
	Uncordon(ctx context.Context, node string) error
}

Drainer manages cordoning nodes and evicting Pods.

func New

func New(config *Config) Drainer

New returns a new Drainer.

Jump to

Keyboard shortcuts

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