machine

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 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 ActuatorParams

type ActuatorParams struct {
	Services *services.AzureClients
	Client   client.Client
	Scheme   *runtime.Scheme
}

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.

type AnnotationKey

type AnnotationKey string

AnnotationKey represents the key value of a Kubernetes annotation.

const (
	// Name is the annotation key for the machine type's name.
	Name AnnotationKey = "azure-name"
	// ResourceGroup is the annotation key for the machine's resource group.
	ResourceGroup AnnotationKey = "azure-rg"
	// InstanceStatus is the annotation key for the machine's instance status.
	InstanceStatus AnnotationKey = "instance-status"
)

type AzureClient

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

AzureClient holds the Azure SDK and Kubernetes Client for the MachineActuator

var Actuator *AzureClient

Actuator is an instance of the MachineActuator's AzureClient.

func NewMachineActuator

func NewMachineActuator(params ActuatorParams) (*AzureClient, error)

NewMachineActuator creates a new azure client to be used as a machine actuator

func (*AzureClient) Create

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

Create a machine based on the cluster and machine spec parameters.

func (*AzureClient) Delete

func (azure *AzureClient) 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 (*AzureClient) Exists

func (azure *AzureClient) 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 (*AzureClient) GetIP

func (azure *AzureClient) GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error)

GetIP returns the ip address of an existing machine based on the cluster and machine spec passed.

func (*AzureClient) GetKubeConfig

func (azure *AzureClient) 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 (*AzureClient) Update

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

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

type Status

type Status *clusterv1.Machine

Status is an instance of the MachineType custom resource.

Jump to

Keyboard shortcuts

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