Documentation ¶
Overview ¶
Package driver contains the cloud provider specific implementations to manage machines
Package driver contains the cloud provider specific implementations to manage machines ¶
Package driver contains the cloud provider specific implementations to manage machines ¶
Package driver contains the cloud provider specific implementations to manage machines ¶
Package driver contains the cloud provider specific implementations to manage machines ¶
Package driver contains the cloud provider specific implementations to manage machines ¶
Package driver contains the cloud provider specific implementations to manage machines ¶
Package driver contains the cloud provider specific implementations to manage machines
Index ¶
- type AWSDriver
- type AlicloudDriver
- type AzureDriver
- type Driver
- func NewAWSDriver(create func() (string, error), delete func() error, ...) Driver
- func NewDriver(machineID string, secretRef *corev1.Secret, classKind string, ...) Driver
- func NewFakeDriver(create func() (string, string, error), delete func() error, ...) Driver
- func NewPacketDriver(create func() (string, error), delete func() error, ...) Driver
- type FakeDriver
- type GCPDriver
- type OpenStackDriver
- type PacketDriver
- type VMs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSDriver ¶
type AWSDriver struct { AWSMachineClass *v1alpha1.AWSMachineClass CloudConfig *corev1.Secret UserData string MachineID string MachineName string }
AWSDriver is the driver struct for holding AWS machine information
func (*AWSDriver) GetExisting ¶
GetExisting method is used to get machineID for existing AWS machine
type AlicloudDriver ¶
type AlicloudDriver struct { AlicloudMachineClass *v1alpha1.AlicloudMachineClass CloudConfig *corev1.Secret UserData string MachineID string MachineName string }
AlicloudDriver is the driver struct for holding Alicloud machine information
func (*AlicloudDriver) Create ¶
func (c *AlicloudDriver) Create() (string, string, error)
Create is used to create a VM
func (*AlicloudDriver) Delete ¶
func (c *AlicloudDriver) Delete() error
Delete method is used to delete an alicloud machine
func (*AlicloudDriver) GetExisting ¶
func (c *AlicloudDriver) GetExisting() (string, error)
GetExisting method is used to get machineID for existing Alicloud machine
type AzureDriver ¶
type AzureDriver struct { AzureMachineClass *v1alpha1.AzureMachineClass CloudConfig *corev1.Secret UserData string MachineID string MachineName string }
AzureDriver is the driver struct for holding azure machine information
func (*AzureDriver) Create ¶
func (d *AzureDriver) Create() (string, string, error)
Create method is used to create an azure machine
func (*AzureDriver) Delete ¶
func (d *AzureDriver) Delete() error
Delete method is used to delete an azure machine
func (*AzureDriver) GetExisting ¶
func (d *AzureDriver) GetExisting() (string, error)
GetExisting method is used to fetch the machineID for an azure machine
func (*AzureDriver) GetVMs ¶
func (d *AzureDriver) GetVMs(machineID string) (VMs, error)
GetVMs returns a list of VM or VM resources Azure earlier treated all VM resources (instance, NIC, Disks) as a single resource and atomically created/deleted them in the driver interface. This caused issues when the controller crashes, during deletions. To fix this, now GetVMs interface checks for all resources instead of just VMs.
type Driver ¶
type Driver interface { Create() (string, string, error) Delete() error GetExisting() (string, error) GetVMs(string) (VMs, error) }
Driver is the common interface for creation/deletion of the VMs over different cloud-providers.
func NewAWSDriver ¶
func NewAWSDriver(create func() (string, error), delete func() error, existing func() (string, error)) Driver
NewAWSDriver returns an empty AWSDriver object
func NewDriver ¶
func NewDriver(machineID string, secretRef *corev1.Secret, classKind string, machineClass interface{}, machineName string) Driver
NewDriver creates a new driver object based on the classKind
type FakeDriver ¶
type FakeDriver struct {
// contains filtered or unexported fields
}
FakeDriver is a fake driver returned when none of the actual drivers match
func (*FakeDriver) Create ¶
func (d *FakeDriver) Create() (string, string, error)
Create returns a newly created fake driver
func (*FakeDriver) GetExisting ¶
func (d *FakeDriver) GetExisting() (string, error)
GetExisting returns the existing fake driver
type GCPDriver ¶
type GCPDriver struct { GCPMachineClass *v1alpha1.GCPMachineClass CloudConfig *corev1.Secret UserData string MachineID string MachineName string }
GCPDriver is the driver struct for holding GCP machine information
func (*GCPDriver) GetExisting ¶
GetExisting method is used to get machineID for existing GCP machine
type OpenStackDriver ¶
type OpenStackDriver struct { OpenStackMachineClass *v1alpha1.OpenStackMachineClass CloudConfig *corev1.Secret UserData string MachineID string MachineName string }
OpenStackDriver is the driver struct for holding OS machine information
func (*OpenStackDriver) Create ¶
func (d *OpenStackDriver) Create() (string, string, error)
Create method is used to create an OS machine
func (*OpenStackDriver) Delete ¶
func (d *OpenStackDriver) Delete() error
Delete method is used to delete an OS machine
func (*OpenStackDriver) GetExisting ¶
func (d *OpenStackDriver) GetExisting() (string, error)
GetExisting method is used to get machineID for existing OS machine
type PacketDriver ¶
type PacketDriver struct { PacketMachineClass *v1alpha1.PacketMachineClass CloudConfig *corev1.Secret UserData string MachineID string MachineName string }
PacketDriver is the driver struct for holding Packet machine information
func (*PacketDriver) Create ¶
func (d *PacketDriver) Create() (string, string, error)
Create method is used to create a Packet machine
func (*PacketDriver) Delete ¶
func (d *PacketDriver) Delete() error
Delete method is used to delete a Packet machine
func (*PacketDriver) GetExisting ¶
func (d *PacketDriver) GetExisting() (string, error)
GetExisting method is used to get machineID for existing Packet machine