kubernetes

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptFunc

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

func KubernetesSoftware added in v0.16.0

func KubernetesSoftware(current common.Software) common.Software

Types

type Client added in v0.16.0

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

func NewK8sClient added in v0.16.0

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

func (*Client) ApplyClusterRole added in v0.16.0

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

func (*Client) ApplyClusterRoleBinding added in v0.16.0

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

func (*Client) ApplyDeployment added in v0.16.0

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

func (*Client) ApplyNamespace added in v0.16.0

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

func (*Client) ApplyRole added in v0.16.0

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

func (*Client) ApplyRoleBinding added in v0.16.0

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

func (*Client) ApplySecret added in v0.16.0

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

func (*Client) ApplyServiceAccount added in v0.16.0

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

func (*Client) Available added in v0.16.0

func (c *Client) Available() bool

func (*Client) DeleteDeployment added in v0.16.0

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

func (*Client) Drain added in v0.16.0

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

func (*Client) EnsureDeleted added in v0.16.0

func (c *Client) EnsureDeleted(name string, machine *Machine, node NodeWithKubeadm, drain bool) (err error)

func (*Client) GetNode added in v0.16.0

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

func (*Client) ListNodes added in v0.16.0

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

func (*Client) Refresh added in v0.16.0

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

func (*Client) Uncordon added in v0.16.0

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

type Current

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

type CurrentCluster

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

type DesiredV0

type DesiredV0 struct {
	Common orbiter.Common `yaml:",inline"`
	Spec   Spec
}
type DesiredV1 struct {
	Common orbiter.Common `yaml:",inline"`
	Spec   struct {
		Verbose           bool
		KubernetesVersion string
		Versions          struct {
			Orbiter string
			Boom    string
		}
		Networking struct {
			DNSDomain   string
			Network     string
			ServiceCidr orbiter.CIDR
			PodCidr     orbiter.CIDR
		}
		ControlPlane Pool
		Workers      []*Pool
	}
}

type File added in v0.16.0

type File struct {
	Name    string
	Content []byte
}

type IDFunc added in v0.16.0

type IDFunc func() string

func (IDFunc) ID added in v0.16.0

func (i IDFunc) ID() string

type KubernetesVersion added in v0.16.0

type KubernetesVersion int
const (
	Unknown KubernetesVersion = iota
	V1x15x0
	V1x15x1
	V1x15x2
	V1x15x3
	V1x15x4
	V1x16x0
	V1x16x1
	V1x16x2
	V1x16x3
	V1x16x4
	V1x17x0
	V1x17x1
	V1x17x2
)

func ParseString added in v0.16.0

func ParseString(version string) KubernetesVersion

func (KubernetesVersion) DefineSoftware added in v0.16.0

func (k KubernetesVersion) DefineSoftware() common.Software

func (KubernetesVersion) ExtractMinor added in v0.16.0

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

func (KubernetesVersion) ExtractPatch added in v0.16.0

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

func (KubernetesVersion) NextHighestMinor added in v0.16.0

func (k KubernetesVersion) NextHighestMinor() KubernetesVersion

func (KubernetesVersion) String added in v0.16.0

func (k KubernetesVersion) String() string

type Machine added in v0.16.0

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

type MachineMetadata added in v0.16.0

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

type NodeWithKubeadm added in v0.16.0

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

type NotAvailableError added in v0.16.0

type NotAvailableError struct{}

func (*NotAvailableError) Error added in v0.16.0

func (n *NotAvailableError) Error() string

type Pool

type Pool struct {
	UpdatesDisabled bool
	Provider        string
	Nodes           int
	Pool            string
}

type Spec added in v0.15.0

type Spec struct {
	ControlPlane Pool
	Kubeconfig   *orbiter.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 Tier

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

type Versions added in v0.16.0

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