Documentation
¶
Index ¶
- Constants
- func GetSSHClient(host string, privatekey string) (*ssh.Client, error)
- type ActuatorParams
- type AnnotationKey
- type AzureClient
- func (azure *AzureClient) Create(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error
- func (azure *AzureClient) Delete(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error
- func (azure *AzureClient) Exists(ctx context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error)
- func (azure *AzureClient) GetIP(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error)
- func (azure *AzureClient) GetKubeConfig(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (string, error)
- func (azure *AzureClient) Update(ctx context.Context, cluster *clusterv1.Cluster, ...) error
- type Status
Constants ¶
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 ¶
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.