k8sclient

package
v0.0.0-...-4750422 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTransientDrain = errors.New("server unable to handle drain request")

Functions

This section is empty.

Types

type K8sClient

type K8sClient struct {
	Client *kubernetes.Clientset

	Drainer *drain.Helper
	// contains filtered or unexported fields
}

Kubernetes client

func NewK8sClient

func NewK8sClient() (*K8sClient, error)

func (*K8sClient) CordonNode

func (c *K8sClient) CordonNode(node *corev1.Node) error

func (*K8sClient) DeleteNode

func (c *K8sClient) DeleteNode(nodeName string) error

func (*K8sClient) DrainNode

func (c *K8sClient) DrainNode(node *corev1.Node) error

func (*K8sClient) GetNodes

func (c *K8sClient) GetNodes() NodeMap

func (*K8sClient) GetServerVersion

func (c *K8sClient) GetServerVersion() (*version.Info, error)

func (*K8sClient) SetNodeRoles

func (c *K8sClient) SetNodeRoles(node *corev1.Node) error

func (*K8sClient) WaitUntilNoPodsPending

func (c *K8sClient) WaitUntilNoPodsPending() error

func (*K8sClient) WaitUntilNodeReady

func (c *K8sClient) WaitUntilNodeReady(nodeName string) (*corev1.Node, error)

type NodeMap

type NodeMap map[string]*corev1.Node

map of NodeName->Node

Jump to

Keyboard shortcuts

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