userdata

package
v0.1.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2018 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 InitConfiguration

type InitConfiguration struct {
	Type           string `yaml:"type,omitempty"`
	TrustEndpoint  string `yaml:"trustEndpoint,omitempty"`
	EtcdEndpoint   string `yaml:"etcdEndpoint,omitempty"`
	EtcdMemberName string `yaml:"etcdMemberName,omitempty"`
	SelfHosted     bool   `yaml:"selfHosted,omitempty"`
}

InitConfiguration describes the init strategy.

type Kubeadm

type Kubeadm struct {
	ContainerRuntime string             `yaml:"containerRuntime,omitempty"`
	Configuration    string             `yaml:"configuration,omitempty"`
	Init             *InitConfiguration `yaml:"init,omitempty"`
}

Kubeadm describes the set of configuration options available for kubeadm.

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 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 ROTD

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

ROTD 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 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 {
	Kubeadm *Kubeadm `yaml:"kubeadm"`
	ROTD    *ROTD    `yaml:"rotd"`
}

Services represents the set of services available to configure.

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.

Jump to

Keyboard shortcuts

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