machine

package
v0.3.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bond

type Bond struct {
	Mode       string   `yaml:"mode"`
	HashPolicy string   `yaml:"hashpolicy"`
	LACPRate   string   `yaml:"lacprate"`
	Interfaces []string `yaml:"interfaces"`
}

Bond contains the various options for configuring a bonded interface.

type Device

type Device struct {
	Interface string  `yaml:"interface"`
	CIDR      string  `yaml:"cidr"`
	Routes    []Route `yaml:"routes"`
	Bond      *Bond   `yaml:"bond"`
	MTU       int     `yaml:"mtu"`
	DHCP      bool    `yaml:"dhcp"`
	Ignore    bool    `yaml:"ignore"`
}

Device represents a network interface.

type Disk

type Disk struct {
	Device     string      `yaml:"device,omitempty"`
	Partitions []Partition `yaml:"partitions,omitempty"`
}

Disk represents the options available for partitioning, formatting, and mounting extra disks.

type Env

type Env = map[string]string

Env represents a set of environment variables.

type File

type File struct {
	Contents    string      `yaml:"contents"`
	Permissions os.FileMode `yaml:"permissions"`
	Path        string      `yaml:"path"`
}

File represents a file to write to disk.

type Install

type Install interface {
	Image() string
	Disk() string
	ExtraDisks() []Disk
	ExtraKernelArgs() []string
	Zero() bool
	Force() bool
	WithBootloader() bool
}

Install defines the requirements for a config that pertains to install related options.

type Kubelet

type Kubelet interface {
	ExtraMounts() []specs.Mount
}

Kubelet defines the requirements for a config that pertains to kubelet related options.

type Machine

type Machine interface {
	Install() Install
	Security() Security
	Network() Network
	Time() Time
	Env() Env
	Files() []File
	Type() Type
	Kubelet() Kubelet
}

Machine defines the requirements for a config that pertains to machine related options.

type Network

type Network interface {
	Hostname() string
	SetHostname(string)
	Devices() []Device
}

Network defines the requirements for a config that pertains to network related options.

type Partition

type Partition struct {
	Size       uint   `yaml:"size,omitempty"`
	MountPoint string `yaml:"mountpoint,omitempty"`
}

Partition represents the options for a device partition.

type Route

type Route struct {
	Network string `yaml:"network"`
	Gateway string `yaml:"gateway"`
}

Route represents a network route.

type Security

type Security interface {
	CA() *x509.PEMEncodedCertificateAndKey
	Token() string
	CertSANs() []string
	SetCertSANs([]string)
}

Security defines the requirements for a config that pertains to security related options.

type Time

type Time interface {
	Server() string
}

Time defines the requirements for a config that pertains to time related options.

type Type

type Type int

Type represents the node type.

const (
	// Bootstrap represents a bootstrap node.
	Bootstrap Type = iota
	// ControlPlane represents a control plane node.
	ControlPlane
	// Worker represents a worker node.
	Worker
)

Jump to

Keyboard shortcuts

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