k8s

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorDrainIsLocked

func NewErrorDrainIsLocked() error

func NewErrorFailedToEvictAllPods

func NewErrorFailedToEvictAllPods() error

Types

type Client

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

func NewClient

func NewClient(kubeconfig string) (*Client, error)

Create a new kubernetes client, defaults to in-cluster if no kubeconfig is provided

func NewFakeClient

func NewFakeClient() (*Client, *fake.Clientset)

Create a test client with a fake kubernetes clientset

func (*Client) DrainNode

func (c *Client) DrainNode(node string) error

Drain a node from all pods and set it to unschedulable. Status will be tracked in lease, only one drain will be run at a time.

func (*Client) FindNodeByZincatiID

func (c *Client) FindNodeByZincatiID(zincatiID string) (string, error)

Find the node in the cluster with the matching machine id

func (*Client) IsDrained

func (c *Client) IsDrained(node string) (bool, error)

Check if a node has been drained

func (*Client) UncordonNode

func (c *Client) UncordonNode(node string) error

Uncordon a node

type ErrorDrainIsLocked

type ErrorDrainIsLocked struct{}

func (ErrorDrainIsLocked) Error

func (e ErrorDrainIsLocked) Error() string

type ErrorFailedToEvictAllPods

type ErrorFailedToEvictAllPods struct{}

func (ErrorFailedToEvictAllPods) Error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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