v1alpha1

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha1 provides user-facing v1alpha1 machine configs nolint: dupl

Package v1alpha1 provides user-facing v1alpha1 machine configs nolint: dupl

Package v1alpha1 provides user-facing v1alpha1 machine configs nolint: dupl

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrRequiredSection denotes a section is required
	ErrRequiredSection = errors.New("required userdata section")
	// ErrInvalidVersion denotes that the config file version is invalid
	ErrInvalidVersion = errors.New("invalid config version")

	// ErrInvalidCert denotes that the certificate specified is invalid
	ErrInvalidCert = errors.New("certificate is invalid")
	// ErrInvalidCertType denotes that the certificate type is invalid
	ErrInvalidCertType = errors.New("certificate type is invalid")

	// ErrUnsupportedCNI denotes that the specified CNI is invalid
	ErrUnsupportedCNI = errors.New("unsupported CNI driver")
	// ErrInvalidTrustdToken denotes that a trustd token has not been specified
	ErrInvalidTrustdToken = errors.New("trustd token is invalid")

	// ErrBadAddressing denotes that an incorrect combination of network
	// address methods have been specified
	ErrBadAddressing = errors.New("invalid network device addressing method")
	// ErrInvalidAddress denotes that a bad address was provided
	ErrInvalidAddress = errors.New("invalid network address")
)

Functions

This section is empty.

Types

type APIServerConfig

type APIServerConfig struct {
	Image     string            `yaml:"image,omitempty"`
	ExtraArgs map[string]string `yaml:"extraArgs,omitempty"`
	CertSANs  []string          `yaml:"certSANs,omitempty"`
}

APIServerConfig represents kube apiserver config vals

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 nolint: dupl

type ClusterCAConfig

type ClusterCAConfig struct {
	Crt string `yaml:"crt"`
	Key string `yaml:"key"`
}

ClusterCAConfig represents kube cert config vals

type ClusterConfig

type ClusterConfig struct {
	ControlPlane      *ControlPlaneConfig      `yaml:"controlPlane"`
	ClusterName       string                   `yaml:"clusterName,omitempty"`
	Network           *ClusterNetworkConfig    `yaml:"network,omitempty"`
	Token             string                   `yaml:"token,omitempty"`
	CA                *ClusterCAConfig         `yaml:"ca,omitempty"`
	APIServer         *APIServerConfig         `yaml:"apiServer,omitempty"`
	ControllerManager *ControllerManagerConfig `yaml:"controllerManager,omitempty"`
	Scheduler         *SchedulerConfig         `yaml:"scheduler,omitempty"`
	Etcd              *EtcdConfig              `yaml:"etcd,omitempty"`
}

ClusterConfig reperesents the cluster-wide config values

type ClusterNetworkConfig

type ClusterNetworkConfig struct {
	DNSDomain     string   `yaml:"dnsDomain"`
	PodSubnet     []string `yaml:"podSubnets"`
	ServiceSubnet []string `yaml:"serviceSubnets"`
}

ClusterNetworkConfig represents kube networking config vals

type ControlPlaneConfig

type ControlPlaneConfig struct {

	// Endpoint is the canonical controlplane endpoint, which can be an IP
	// address or a DNS hostname, is single-valued, and may optionally include a
	// port number.  It is optional and if not supplied, the IP address of the
	// first master node will be used.
	Endpoint string `yaml:"endpoint,omitempty"`

	IPs   []string `yaml:"ips"`
	Index int      `yaml:"index,omitempty"`
}

ControlPlaneConfig represents control plane config vals

type ControllerManagerConfig

type ControllerManagerConfig struct {
	Image     string            `yaml:"image,omitempty"`
	ExtraArgs map[string]string `yaml:"extraArgs,omitempty"`
}

ControllerManagerConfig represents kube controller manager config vals

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 indicates that the device should be ignored by any talos setup routines
	Ignore bool `yaml:"ignore"`
}

Device represents a network interface nolint: dupl

func (*Device) Validate

func (d *Device) Validate(checks ...NetworkDeviceCheck) error

Validate triggers the specified validation checks to run nolint: dupl

type EtcdConfig

type EtcdConfig struct {
	Image string `yaml:"image,omitempty"`
}

EtcdConfig represents etcd config vals

type ExtraDisk

type ExtraDisk struct {
	Disk       string                `yaml:"disk,omitempty"`
	Partitions []*ExtraDiskPartition `yaml:"partitions,omitempty"`
}

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

type ExtraDiskPartition

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

ExtraDiskPartition represents the options for a device partition.

type Install

type Install struct {
	Disk            string       `yaml:"disk,omitempty"`
	ExtraDisks      []*ExtraDisk `yaml:"extraDisks,omitempty"`
	ExtraKernelArgs []string     `yaml:"extraKernelArgs,omitempty"`
	Image           string       `yaml:"image,omitempty"`
	Bootloader      bool         `yaml:"bootloader,omitempty"`
	Wipe            bool         `yaml:"wipe"`
	Force           bool         `yaml:"force"`
}

Install represents the installation options for preparing a node.

type KubeletConfig

type KubeletConfig struct {
	Image     string            `yaml:"image,omitempty"`
	ExtraArgs map[string]string `yaml:"extraArgs,omitempty"`
}

KubeletConfig reperesents the kubelet config values

type MachineCAConfig

type MachineCAConfig struct {
	Crt string `yaml:"crt,omitempty"`
	Key string `yaml:"key,omitempty"`
}

MachineCAConfig reperesents the machine's talos cert config values

type MachineConfig

type MachineConfig struct {
	Type    string           `yaml:"type"`
	Token   string           `yaml:"token"`
	CA      *MachineCAConfig `yaml:"ca,omitempty"`
	Kubelet *KubeletConfig   `yaml:"kubelet,omitempty"`
	Network *NetworkConfig   `yaml:"network,omitempty"`
	Install *Install         `yaml:"install,omitempty"`
}

MachineConfig reperesents the machine-specific config values

type NetworkConfig

type NetworkConfig struct {
	Hostname   string    `yaml:"hostname,omitempty"`
	Interfaces []*Device `yaml:"interfaces,omitempty"`
}

NetworkConfig reperesents the machine's networking config values

type NetworkDeviceCheck

type NetworkDeviceCheck func(*Device) error

NetworkDeviceCheck defines the function type for checks nolint: dupl

func CheckDeviceAddressing

func CheckDeviceAddressing() NetworkDeviceCheck

CheckDeviceAddressing ensures that an appropriate addressing method has been specified nolint: dupl

func CheckDeviceInterface

func CheckDeviceInterface() NetworkDeviceCheck

CheckDeviceInterface ensures that the interface has been specified nolint: dupl

func CheckDeviceRoutes

func CheckDeviceRoutes() NetworkDeviceCheck

CheckDeviceRoutes ensures that the specified routes are valid nolint: dupl

type NodeConfig

type NodeConfig struct {
	Version string
	Machine *MachineConfig
	Cluster *ClusterConfig
}

NodeConfig holds the full representation of the node config

type Route

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

Route represents a network route nolint: dupl

type SchedulerConfig

type SchedulerConfig struct {
	Image     string            `yaml:"image,omitempty"`
	ExtraArgs map[string]string `yaml:"extraArgs,omitempty"`
}

SchedulerConfig represents kube scheduler config vals

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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