machine

package
v0.1.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProviderName is the default name of the cloud provider used.
	ProviderName = "azure"
	// SSHUser is the default ssh username.
	SSHUser = "ClusterAPI"
)

Variables

This section is empty.

Functions

func GetSSHClient

func GetSSHClient(host string, privatekey string) (*ssh.Client, error)

GetSSHClient returns an instance of ssh.Client from the host and private key passed.

Types

type Actuator

type Actuator struct {
	*deployer.Deployer
	// contains filtered or unexported fields
}

Actuator is responsible for performing machine reconciliation.

func NewActuator

func NewActuator(params ActuatorParams) *Actuator

NewActuator returns an actuator.

func (*Actuator) Create

func (a *Actuator) Create(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error

Create creates a machine and is invoked by the machine controller.

func (*Actuator) Delete

func (a *Actuator) Delete(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error

Delete an existing machine based on the cluster and machine spec passed. Will block until the machine has been successfully deleted, or an error is returned.

func (*Actuator) Exists

func (a *Actuator) Exists(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error)

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

func (*Actuator) Update

func (a *Actuator) Update(ctx context.Context, cluster *clusterv1.Cluster, goalMachine *clusterv1.Machine) error

Update updates a machine and is invoked by the Machine Controller. If the Update attempts to mutate any immutable state, the method will error and no updates will be performed.

type ActuatorParams

type ActuatorParams struct {
	Client client.ClusterV1alpha1Interface
}

ActuatorParams contains the parameters that are used to create a machine actuator. These are not indicative of all requirements for a machine actuator, environment variables are also necessary.

Jump to

Keyboard shortcuts

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