drain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright (C) 2022 Poseidon Labs Copyright (C) 2022 Dalton Hubble

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

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