kubernetes

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptFunc

func AdaptFunc(
	orb *orb.Orb,
	orbiterCommit string,
	id string,
	oneoff bool,
	deployOrbiterAndBoom bool,
	destroyProviders func() (map[string]interface{}, error),
	whitelist func(whitelist []*orbiter.CIDR)) orbiter.AdaptFunc

func KubernetesSoftware

func KubernetesSoftware(current common.Software) common.Software

func SecretFunc

func SecretFunc(orb *orb.Orb) secret.Func

Types

type Client

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

func NewK8sClient

func NewK8sClient(monitor mntr.Monitor, kubeconfig *string) *Client

func (*Client) ApplyClusterRole

func (c *Client) ApplyClusterRole(rsc *rbac.ClusterRole) error

func (*Client) ApplyClusterRoleBinding

func (c *Client) ApplyClusterRoleBinding(rsc *rbac.ClusterRoleBinding) error

func (*Client) ApplyDeployment

func (c *Client) ApplyDeployment(rsc *apps.Deployment) error

func (*Client) ApplyNamespace

func (c *Client) ApplyNamespace(rsc *core.Namespace) error

func (*Client) ApplyRole

func (c *Client) ApplyRole(rsc *rbac.Role) error

func (*Client) ApplyRoleBinding

func (c *Client) ApplyRoleBinding(rsc *rbac.RoleBinding) error

func (*Client) ApplySecret

func (c *Client) ApplySecret(rsc *core.Secret) error

func (*Client) ApplyService

func (c *Client) ApplyService(rsc *core.Service) error

func (*Client) ApplyServiceAccount

func (c *Client) ApplyServiceAccount(rsc *core.ServiceAccount) error

func (*Client) Available

func (c *Client) Available() bool

func (*Client) DeleteDeployment

func (c *Client) DeleteDeployment(namespace, name string) error

func (*Client) Drain

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

func (*Client) EnsureDeleted

func (c *Client) EnsureDeleted(name string, machine *Machine, node NodeWithKubeadm, drain bool) (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(machine *Machine, node *core.Node) (err error)

type Current

type Current struct {
	Common  tree.Common `yaml:",inline"`
	Current *CurrentCluster
}

type CurrentCluster

type CurrentCluster struct {
	Status   string
	Machines map[string]*Machine `yaml:"machines"`
}

type DesiredV0

type DesiredV0 struct {
	Common tree.Common `yaml:",inline"`
	Spec   Spec
}

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
	V1x15x5
	V1x15x6
	V1x15x7
	V1x15x8
	V1x15x9
	V1x16x0
	V1x16x1
	V1x16x2
	V1x16x3
	V1x16x4
	V1x16x5
	V1x16x6
	V1x17x0
	V1x17x1
	V1x17x2
	V1x18x0
)

func ParseString

func ParseString(version string) KubernetesVersion

func (KubernetesVersion) DefineSoftware

func (k KubernetesVersion) DefineSoftware() common.Software

func (KubernetesVersion) ExtractMinor

func (k KubernetesVersion) ExtractMinor(monitor mntr.Monitor) (int, error)

func (KubernetesVersion) ExtractPatch

func (k KubernetesVersion) ExtractPatch(monitor mntr.Monitor) (int, error)

func (KubernetesVersion) NextHighestMinor

func (k KubernetesVersion) NextHighestMinor() KubernetesVersion

func (KubernetesVersion) String

func (k KubernetesVersion) String() string

type Machine

type Machine struct {
	Joined             bool
	Online             bool
	Ready              bool
	FirewallIsReady    bool
	NodeAgentIsRunning bool
	Metadata           MachineMetadata `yaml:",inline"`
}

type MachineMetadata

type MachineMetadata struct {
	Tier     Tier
	Provider string
	Pool     string
	Group    string `yaml:",omitempty"`
}

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

type Pool

type Pool struct {
	UpdatesDisabled bool
	Provider        string
	Nodes           int
	Pool            string
	Taints          *Taints `yaml:"taints,omitempty"`
}

type Spec

type Spec struct {
	ControlPlane Pool
	Kubeconfig   *secret.Secret `yaml:",omitempty"`
	Networking   struct {
		DNSDomain   string
		Network     string
		ServiceCidr orbiter.CIDR
		PodCidr     orbiter.CIDR
	}
	Verbose  bool
	Versions struct {
		Kubernetes string
		Orbiter    string
		Boom       string
	}
	Workers []*Pool
}

type Taint

type Taint struct {
	Key    string           `yaml:"key"`
	Value  string           `yaml:"value,omitempty"`
	Effect core.TaintEffect `yaml:"effect"`
}

type Taints

type Taints []Taint

func (*Taints) ToK8sTaints

func (t *Taints) ToK8sTaints() []core.Taint

type Tier

type Tier string
const (
	Controlplane Tier = "controlplane"
	Workers      Tier = "workers"
)

type Versions

type Versions struct {
	NodeAgent  string
	Kubernetes string
}

Jump to

Keyboard shortcuts

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