machine

package
v0.0.0-...-6478544 Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName = "ssh"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Actuator

type Actuator struct {
	// contains filtered or unexported fields
}

Actuator is responsible for performing machine reconciliation

func NewActuator

func NewActuator(params ActuatorParams) (*Actuator, error)

NewActuator creates a new Actuator

func (*Actuator) Create

func (a *Actuator) Create(c *clusterv1.Cluster, m *clusterv1.Machine) error

Create creates a machine and is invoked by the Machine Controller

func (*Actuator) Delete

func (a *Actuator) Delete(c *clusterv1.Cluster, m *clusterv1.Machine) error

Delete deletes a machine and is invoked by the Machine Controller

func (*Actuator) Exists

func (a *Actuator) Exists(c *clusterv1.Cluster, m *clusterv1.Machine) (bool, error)

Exists test for the existence of a machine and is invoked by the Machine Controller

func (*Actuator) GetIP

func (a *Actuator) GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error)

GetIP returns IP of a machine, note that this also REQUIRED by clusterCreator (clusterdeployer.ProviderDeployer)

func (*Actuator) GetKubeConfig

func (a *Actuator) GetKubeConfig(c *clusterv1.Cluster, m *clusterv1.Machine) (string, error)

GetKubeConfig returns the kubeconfig file, note that this also REQUIRED by clusterCreator (clusterdeployer.ProviderDeployer)

func (*Actuator) Update

func (a *Actuator) Update(c *clusterv1.Cluster, goalMachine *clusterv1.Machine) error

Update updates a machine and is invoked by the Machine Controller

type ActuatorParams

type ActuatorParams struct {
	ClusterClient            client.ClusterInterface
	EventRecorder            record.EventRecorder
	KubeClient               *kubernetes.Clientset
	V1Alpha1Client           client.ClusterV1alpha1Interface
	MachineSetupConfigGetter SSHClientMachineSetupConfigGetter
}

ActuatorParams holds parameter information for Actuator

type AnnotationKey

type AnnotationKey string
const (
	InstanceStatus AnnotationKey = "instance-status"
	Name           AnnotationKey = "machine-name"
)

type ConfigWatch

type ConfigWatch struct {
	// contains filtered or unexported fields
}

Config Watch holds the path to the named machines yaml file.

func NewConfigWatch

func NewConfigWatch(path string) (*ConfigWatch, error)

func (*ConfigWatch) GetMachineSetupConfig

func (cw *ConfigWatch) GetMachineSetupConfig() (MachineSetupConfig, error)

type MachineConfigList

type MachineConfigList struct {
	Items []MachineItem `json:"items"`
}

MachineConfigList is a list of MachineItems

type MachineItem

type MachineItem struct {
	//TODO originally this was a list, investigate if we would.
	Params   MachineParams `json:"machineParams"`
	Metadata Metadata      `json:"metadata"`
}

MachineItem holds MachineParams and Metadata

type MachineParams

type MachineParams struct {
	Roles    []v1alpha1.MachineRole       `json:"roles"`
	Versions clusterv1.MachineVersionInfo `json:"versions"`
}

MachineParams holds api roles and versions for a machine item.

type MachineSetupConfig

type MachineSetupConfig interface {
	GetYaml() (string, error)
	GetMetadata(params *MachineParams) (Metadata, error)
}

MachineSetupConfig defines the methods necessaty for a setup config

type MachineStatus

type MachineStatus *clusterv1.Machine

type Metadata

type Metadata struct {
	StartupScript  string `json:"startupScript"`
	ShutdownScript string `json:"shutdownScript"`
	UpgradeScript  string `json:"upgradeScript"`
	Items          map[string]string
}

type SSHClientKubeadm

type SSHClientKubeadm interface {
	TokenCreate(params kubeadm.TokenCreateParams) (string, error)
}

type SSHClientMachineSetupConfigGetter

type SSHClientMachineSetupConfigGetter interface {
	GetMachineSetupConfig() (MachineSetupConfig, error)
}

type ValidMachineConfigItems

type ValidMachineConfigItems struct {
	// contains filtered or unexported fields
}

ValidMachineConfigItems refers to the valid machine setup configs parsed out of the machine setup configs yaml file held in ConfigWatch.

func (*ValidMachineConfigItems) GetMetadata

func (vc *ValidMachineConfigItems) GetMetadata(params *MachineParams) (Metadata, error)

GetMetadata returns the metadata contained in ValidMachineConfigItems.

func (*ValidMachineConfigItems) GetYaml

func (vc *ValidMachineConfigItems) GetYaml() (string, error)

GetYaml returns a string yaml representation of ValidMachineConfigItems.

Jump to

Keyboard shortcuts

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