drain

package
v0.70.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 16 Imported by: 3 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CordonHelper

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

CordonHelper wraps functionality to cordon/uncordon nodes

func NewCordonHelper

func NewCordonHelper(node *corev1.Node, desired bool) *CordonHelper

NewCordonHelper returns a new CordonHelper

func NewCordonHelperFromRuntimeObject

func NewCordonHelperFromRuntimeObject(nodeObject runtime.Object, scheme *runtime.Scheme, gvk schema.GroupVersionKind, desired bool) (*CordonHelper, error)

NewCordonHelperFromRuntimeObject returns a new CordonHelper, or an error if given object is not a node or cannot be encoded as JSON

func (*CordonHelper) IsUpdateRequired

func (c *CordonHelper) IsUpdateRequired() bool

IsUpdateRequired returns true if c.node.Spec.Unschedulable matches desired state, or false when it is

func (*CordonHelper) PatchOrReplace

func (c *CordonHelper) PatchOrReplace(clientset kubernetes.Interface) (error, error)

PatchOrReplace uses given clientset to update the node status, either by patching or updating the given node object; it may return error if the object cannot be encoded as JSON, or if either patch or update calls fail; it will also return a second error whenever creating a patch has failed

type Evictor

type Evictor interface {
	CanUseEvictions() error
	EvictOrDeletePod(pod corev1.Pod) error
	GetPodsForEviction(nodeName string) (*evictor.PodDeleteList, []error)
}

type NodeGroupDrainer

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

func NewNodeGroupDrainer

func NewNodeGroupDrainer(clientSet kubernetes.Interface, ng eks.KubeNodeGroup, waitTimeout time.Duration, maxGracePeriod time.Duration, undo bool, disableEviction bool) NodeGroupDrainer

func (*NodeGroupDrainer) Drain

func (n *NodeGroupDrainer) Drain() error

Drain drains a nodegroup

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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