client

package
v1.20.14 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SingletonClientGenerator

type SingletonClientGenerator struct {
	KubeConfig      string
	APIServerURL    string
	RequestTimeout  time.Duration
	DeletionTimeout time.Duration
	MaxGracePeriod  time.Duration
	// contains filtered or unexported fields
}

SingletonClientGenerator provides clients

func NewClientGenerator

func NewClientGenerator(cfg *types.Config) *SingletonClientGenerator

func (*SingletonClientGenerator) AnnoteNode

func (p *SingletonClientGenerator) AnnoteNode(nodeName string, annotations map[string]string) error

AnnoteNode set annotation on node

func (*SingletonClientGenerator) CordonNode

func (p *SingletonClientGenerator) CordonNode(nodeName string) error

func (*SingletonClientGenerator) DeleteNode

func (p *SingletonClientGenerator) DeleteNode(nodeName string) error

func (*SingletonClientGenerator) DrainNode

func (p *SingletonClientGenerator) DrainNode(nodeName string, ignoreDaemonSet, deleteLocalData bool) error

func (*SingletonClientGenerator) KubeClient

KubeClient generates a kube client if it was not created before

func (*SingletonClientGenerator) LabelNode

func (p *SingletonClientGenerator) LabelNode(nodeName string, labels map[string]string) error

AnnoteNode set annotation on node

func (*SingletonClientGenerator) MarkDrainNode

func (p *SingletonClientGenerator) MarkDrainNode(nodeName string) error

func (*SingletonClientGenerator) NodeList

func (p *SingletonClientGenerator) NodeList() (*apiv1.NodeList, error)

NodeList return node list from cluster

func (*SingletonClientGenerator) PodList

func (p *SingletonClientGenerator) PodList(nodeName string, podFilter types.PodFilterFunc) ([]apiv1.Pod, error)

PodList return list of pods hosted on named node

func (*SingletonClientGenerator) SetProviderID

func (p *SingletonClientGenerator) SetProviderID(nodeName, providerID string) error

func (*SingletonClientGenerator) UncordonNode

func (p *SingletonClientGenerator) UncordonNode(nodeName string) error

func (*SingletonClientGenerator) WaitNodeToBeReady

func (p *SingletonClientGenerator) WaitNodeToBeReady(nodeName string, timeToWaitInSeconds int) error

Jump to

Keyboard shortcuts

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