userdata

package
v0.0.0-...-088a001 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blockd

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

Blockd describes the configuration of the blockd service.

type CRT

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

CRT describes the configuration of the container runtime service.

type File

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

File represents a files to write to disk.

type Init

type Init struct {
	ContainerRuntime string `yaml:"containerRuntime,omitempty"`
}

Init describes the configuration of the init service.

type Kubeadm

type Kubeadm struct {
	Configuration runtime.Object `yaml:"configuration"`
	// contains filtered or unexported fields
}

Kubeadm describes the set of configuration options available for kubeadm.

func (*Kubeadm) MarshalYAML

func (kdm *Kubeadm) MarshalYAML() (interface{}, error)

MarshalYAML implements the yaml.Marshaler interface.

func (*Kubeadm) UnmarshalYAML

func (kdm *Kubeadm) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

type Kubelet

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

Kubelet describes the configuration of the kubelet service.

type KubernetesSecurity

type KubernetesSecurity struct {
	CA *x509.PEMEncodedCertificateAndKey `yaml:"ca"`
}

KubernetesSecurity represents the set of security options specific to Kubernetes.

type Networking

type Networking struct {
	OS         struct{} `yaml:"os"`
	Kubernetes struct{} `yaml:"kubernetes"`
}

Networking represents the set of options available to configure networking.

type OSD

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

OSD describes the configuration of the osd service.

type OSSecurity

type OSSecurity struct {
	CA       *x509.PEMEncodedCertificateAndKey `yaml:"ca"`
	Identity *x509.PEMEncodedCertificateAndKey `yaml:"identity"`
}

OSSecurity represents the set of security options specific to the OS.

type Proxyd

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

Proxyd describes the configuration of the proxyd service.

type Security

type Security struct {
	OS         *OSSecurity         `yaml:"os"`
	Kubernetes *KubernetesSecurity `yaml:"kubernetes"`
}

Security represents the set of options available to configure security.

type Services

type Services struct {
	Init    *Init    `yaml:"init"`
	Kubelet *Kubelet `yaml:"kubelet"`
	Kubeadm *Kubeadm `yaml:"kubeadm"`
	Trustd  *Trustd  `yaml:"trustd"`
	Proxyd  *Proxyd  `yaml:"proxyd"`
	Blockd  *Blockd  `yaml:"blockd"`
	OSD     *OSD     `yaml:"osd"`
	CRT     *CRT     `yaml:"crt"`
}

Services represents the set of services available to configure.

type Trustd

type Trustd struct {
	Image     string   `yaml:"image,omitempty"`
	Username  string   `yaml:"username"`
	Password  string   `yaml:"password"`
	Endpoints []string `yaml:"endpoints,omitempty"`
}

Trustd describes the configuration of the Root of Trust (RoT) service. The username and password are used by master nodes, and worker nodes. The master nodes use them to authenticate clients, while the workers use them to authenticate as a client. The endpoints should only be specified in the worker user data, and should include all master nodes participating as a RoT.

type UserData

type UserData struct {
	Version    string      `yaml:"version"`
	Security   *Security   `yaml:"security"`
	Networking *Networking `yaml:"networking"`
	Services   *Services   `yaml:"services"`
	Files      []*File     `yaml:"files"`
	Debug      bool        `yaml:"debug"`
}

UserData represents the user data.

func Download

func Download(url string) (data UserData, err error)

Download initializes a UserData struct from a remote URL.

func Open

func Open(p string) (data *UserData, err error)

Open is a convenience function that reads the user data from disk, and unmarshals it.

func (*UserData) IsBootstrap

func (data *UserData) IsBootstrap() bool

IsBootstrap indicates if the current kubeadm configuration is a master init configuration.

func (*UserData) IsControlPlane

func (data *UserData) IsControlPlane() bool

IsControlPlane indicates if the current kubeadm configuration is a worker acting as a master.

func (*UserData) IsMaster

func (data *UserData) IsMaster() bool

IsMaster indicates if the current kubeadm configuration is a master configuration.

func (*UserData) IsWorker

func (data *UserData) IsWorker() bool

IsWorker indicates if the current kubeadm configuration is a worker configuration.

func (*UserData) WriteFiles

func (data *UserData) WriteFiles() (err error)

WriteFiles writes the requested files to disk.

Jump to

Keyboard shortcuts

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