machine

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: Apache-2.0 Imports: 20 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 determines whether a machine exists based on the cluster and machine spec passed.

func (*Actuator) GetKubeConfig

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

GetKubeConfig gets the kubeconfig of a machine based on the cluster and machine spec passed. Has not been fully tested as k8s is not yet bootstrapped on created machines.

func (*Actuator) Update

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

Update an existing machine based on the cluster and machine spec parameters.

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