kube

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Kube

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

func New

func New(options Options) (*Kube, error)

func (*Kube) Lock

func (kube *Kube) Lock(annotation string) (*Lock, error)

func (*Kube) Node

func (kube *Kube) Node() (*Node, error)

type Lock

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

func (*Lock) Acquire

func (lock *Lock) Acquire(ctx context.Context) error

wait for lock to free and acquire it

func (*Lock) Release

func (lock *Lock) Release() error

attempt to release lock, assuming it is set

func (*Lock) String

func (lock *Lock) String() string

func (*Lock) Test

func (lock *Lock) Test() (value string, acquired bool, err error)

Test lock object

type Node

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

func (*Node) ClearAnnotation

func (node *Node) ClearAnnotation(annotation string) error

func (*Node) GetAnnotation

func (node *Node) GetAnnotation(annotation string) (string, bool, error)

func (*Node) GetCondition

func (node *Node) GetCondition(conditionType corev1.NodeConditionType) (condition corev1.NodeCondition, exists bool, err error)

func (*Node) HasCondition

func (node *Node) HasCondition(conditionType corev1.NodeConditionType) (bool, error)

func (*Node) InitCondition

func (node *Node) InitCondition(conditionType corev1.NodeConditionType) error

func (*Node) SetAnnotation

func (node *Node) SetAnnotation(annotation string, value string) error

func (*Node) SetCondition

func (node *Node) SetCondition(conditions ...corev1.NodeCondition) error

func (*Node) SetSchedulableIfAnnotated

func (node *Node) SetSchedulableIfAnnotated(annotation string) (changed bool, err error)

set node to schedulable if test-and-clear annotation

func (*Node) SetUnschedulable

func (node *Node) SetUnschedulable(unschedulable bool) error

func (*Node) String

func (node *Node) String() string

type Options

type Options struct {
	Namespace string
	DaemonSet string
	Node      string
}

Jump to

Keyboard shortcuts

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