kubernetes

package
v0.26.8 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 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(
	clusterID string,
	oneoff bool,
	deployOrbiter bool,
	destroyProviders func() (map[string]interface{}, error),
	whitelist func(whitelist []*orbiter.CIDR)) orbiter.AdaptFunc

func EnsureBoomArtifacts added in v0.21.0

func EnsureBoomArtifacts(monitor mntr.Monitor, client *Client, boomversion string) error

func EnsureCommonArtifacts added in v0.21.0

func EnsureCommonArtifacts(monitor mntr.Monitor, client *Client) error

func EnsureConfigArtifacts added in v0.21.0

func EnsureConfigArtifacts(monitor mntr.Monitor, client *Client, orb *orb.Orb) error

func EnsureOrbiterArtifacts added in v0.21.0

func EnsureOrbiterArtifacts(monitor mntr.Monitor, client *Client, orbiterversion string) error

func GetProviderInfos added in v0.26.0

func GetProviderInfos(desired *DesiredV0, providerCurrents map[string]interface{}) (map[string]map[string]infra.Pool, *infra.Address, error)

func KubernetesSoftware

func KubernetesSoftware(current common.Software) common.Software

func SecretFunc

func SecretFunc() 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) RefreshConfig added in v0.25.0

func (c *Client) RefreshConfig(config *rest.Config) (err error)

func (*Client) Uncordon

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

type CloudIntegration added in v0.22.0

type CloudIntegration int

type Current

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

type CurrentCluster

type CurrentCluster struct {
	Status   string
	Machines 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
	Unknown         bool
	Metadata        MachineMetadata `yaml:",inline"`
}

type MachineMetadata

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

type Machines added in v0.23.0

type Machines struct {
	// M is exported for yaml (de)serialization and not intended to be accessed by any other code outside this package
	M map[string]*Machine `yaml:",inline"`
	// contains filtered or unexported fields
}

func (*Machines) Delete added in v0.23.0

func (m *Machines) Delete(id string)

func (*Machines) Set added in v0.23.0

func (m *Machines) Set(id string, machine *Machine)

type NodeWithKubeadm

type NodeWithKubeadm interface {
	Execute(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
	}
	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