k8s

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(logger logging.Logger, kubeconfig *string) *Client

func (*Client) ApplyDeployment

func (c *Client) ApplyDeployment(depl *apps.Deployment) (bool, error)

func (*Client) ApplyNamespace

func (c *Client) ApplyNamespace(ns *core.Namespace) (bool, error)

func (*Client) ApplySecret

func (c *Client) ApplySecret(sec *core.Secret) (bool, error)

func (*Client) Available

func (c *Client) Available() bool

func (*Client) DeleteNode

func (c *Client) DeleteNode(name string, node NodeWithKubeadm, drain bool) (err error)

func (*Client) Drain

func (c *Client) Drain(node *core.Node) (err error)

func (*Client) GetNode

func (c *Client) GetNode(id string) (node *core.Node, err error)

func (*Client) ListNodes

func (c *Client) ListNodes(filterID ...string) (nodes []core.Node, err error)

func (*Client) Refresh

func (c *Client) Refresh(kubeconfig *string) (err error)

func (*Client) Uncordon

func (c *Client) Uncordon(node *core.Node) (err error)

func (*Client) UpdateNode

func (c *Client) UpdateNode(node *core.Node) (err error)

type File

type File struct {
	Name    string
	Content []byte
}

type IDFunc

type IDFunc func() string

func (IDFunc) ID

func (i IDFunc) ID() string

type KubernetesVersion

type KubernetesVersion int
const (
	Unknown KubernetesVersion = iota
	V1x15x0
	V1x15x1
	V1x15x2
	V1x15x3
	V1x15x4
	V1x16x0
)

func ParseString

func ParseString(version string) KubernetesVersion

func (KubernetesVersion) DefineSoftware

func (k KubernetesVersion) DefineSoftware() *operator.Software

func (KubernetesVersion) ExtractMinor

func (k KubernetesVersion) ExtractMinor() (int, error)

func (KubernetesVersion) ExtractPatch

func (k KubernetesVersion) ExtractPatch() (int, error)

func (KubernetesVersion) NextHighestMinor

func (k KubernetesVersion) NextHighestMinor() KubernetesVersion

func (KubernetesVersion) String

func (k KubernetesVersion) String() string

type NodeWithKubeadm

type NodeWithKubeadm interface {
	Execute(env map[string]string, stdin io.Reader, cmd string) ([]byte, error)
}

type NotAvailableError

type NotAvailableError struct{}

func (*NotAvailableError) Error

func (n *NotAvailableError) Error() string

Jump to

Keyboard shortcuts

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