kubelet

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromYaml

func FromYaml(c []byte) (types.Resource, error)

FromYaml allows to restore cluster state from YAML.

Types

type Kubelet

type Kubelet struct {
	Address             string    `json:"address" yaml:"address"`
	Image               string    `json:"image" yaml:"image"`
	Host                host.Host `json:"host" yaml:"host"`
	BootstrapKubeconfig string    `json:"bootstrapKubeconfig" yaml:"bootstrapKubeconfig"`
	// TODO we require CA certificate, so it can be referred in bootstrap-kubeconfig. Maybe we should be responsible for creating
	// bootstrap-kubeconfig too then?
	KubernetesCACertificate    string            `json:"kubernetesCACertificate" yaml:"kubernetesCACertificate"`
	ClusterDNSIPs              []string          `json:"clusterDNSIPs" yaml:"clusterDNSIPs"`
	Name                       string            `json:"name" yaml:"name"`
	Taints                     map[string]string `json:"taints" yaml:"taints"`
	Labels                     map[string]string `json:"labels" yaml:"labels"`
	PrivilegedLabels           map[string]string `json:"privilegedLabels" yaml:"privilegedLabels"`
	PrivilegedLabelsKubeconfig string            `json:"privilegedLabelsKubeconfig" yaml:"privilegedLabelsKubeconfig"`
	CgroupDriver               string            `json:"cgroupDriver" yaml:"cgroupDriver"`
	NetworkPlugin              string            `json:"networkPlugin" yaml:"networkPlugin"`

	// Depending on the network plugin, this should be optional, but for now it's required.
	PodCIDR string `json:"podCIDR,omitempty" yaml:"podCIDR,omitempty"`
}

Kubelet represents single kubelet instance.

func (*Kubelet) New

New validates Kubelet configuration and returns it's usable version.

func (*Kubelet) Validate

func (k *Kubelet) Validate() error

Validate validates kubelet configuration.

TODO better validation should be done here

type Pool

type Pool struct {
	// User-configurable fields.
	Image                      string            `json:"image" yaml:"image"`
	SSH                        *ssh.Config       `json:"ssh" yaml:"ssh"`
	BootstrapKubeconfig        string            `json:"bootstrapKubeconfig" yaml:"bootstrapKubeconfig"`
	Kubelets                   []Kubelet         `json:"kubelets" yaml:"kubelets"`
	KubernetesCACertificate    string            `json:"kubernetesCACertificate" yaml:"kubernetesCACertificate"`
	ClusterDNSIPs              []string          `json:"clusterDNSIPs" yaml:"clusterDNSIPs"`
	Taints                     map[string]string `json:"taints" yaml:"taints"`
	Labels                     map[string]string `json:"labels" yaml:"labels"`
	PrivilegedLabels           map[string]string `json:"privilegedLabels" yaml:"privilegedLabels"`
	PrivilegedLabelsKubeconfig string            `json:"privilegedLabelsKubeconfig" yaml:"privilegedLabelsKubeconfig"`
	CgroupDriver               string            `json:"cgroupDriver" yaml:"cgroupDriver"`
	NetworkPlugin              string            `json:"networkPlugin" yaml:"networkPlugin"`

	// Serializable fields.
	State container.ContainersState `json:"state" yaml:"state"`
}

Pool represents group of kubelet instances and their configuration.

func (*Pool) New

func (p *Pool) New() (types.Resource, error)

New validates kubelet pool configuration and fills all members with configured values.

func (*Pool) Validate

func (p *Pool) Validate() error

Validate validates Pool configuration.

TODO add actual validation

Jump to

Keyboard shortcuts

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