View Source
const (

	// MachineCreationSucceeded indicates success for machine creation
	MachineCreationSucceeded = "MachineCreationSucceeded"

	// MachineCreationFailed indicates that machine creation failed
	MachineCreationFailed = "MachineCreationFailed"


This section is empty.


This section is empty.


type Actuator

type Actuator struct {
	// contains filtered or unexported fields

Actuator is responsible for performing machine reconciliation.

func NewActuator

func NewActuator(params ActuatorParams) (*Actuator, error)

NewActuator returns a new AliCloud Actuator

func (*Actuator) Create

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

Create runs an ECS instance

func (*Actuator) CreateMachine

func (a *Actuator) CreateMachine(cluster *clusterv1.Cluster, machine *machinev1.Machine) (*ecs.Instance, error)

CreateMachine starts a new ECS instance as described by the cluster and machine resources

func (*Actuator) Delete

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

Delete deletes a machine and updates its finalizer

func (*Actuator) DeleteMachine

func (a *Actuator) DeleteMachine(cluster *clusterv1.Cluster, machine *machinev1.Machine) error

DeleteMachine deletes an ECS instance

func (*Actuator) Describe

func (a *Actuator) Describe(cluster *clusterv1.Cluster, machine *machinev1.Machine) (*ecs.Instance, error)

func (*Actuator) Exists

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

func (*Actuator) Update

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


type ActuatorParams

type ActuatorParams struct {
	Client                client.Client
	Config                *rest.Config
	AliCloudClientBuilder aliClient.AliCloudClientBuilderFuncType
	Codec                 *providerconfigv1.AlicloudProviderConfigCodec
	EventRecorder         record.EventRecorder

ActuatorParams holds parameter information for Actuator

type AliCloudClientWrapper

type AliCloudClientWrapper struct {
	// contains filtered or unexported fields

AliCloudClientWrapper implements CloudProviderClient for alicloud e2e framework

func NewAliCloudClientWrapper

func NewAliCloudClientWrapper(client aliCloud.Client, regionId string) *AliCloudClientWrapper

func (*AliCloudClientWrapper) GetAvailabilityZoneId

func (client *AliCloudClientWrapper) GetAvailabilityZoneId(machine *machinev1beta1.Machine) (string, error)

GetAvailabilityZoneId gets availability zone

func (*AliCloudClientWrapper) GetDataDisks

func (client *AliCloudClientWrapper) GetDataDisks(machine *machinev1beta1.Machine) (map[string]map[string]interface{}, error)

GetDataDisks gets volumes attached to instance

func (*AliCloudClientWrapper) GetPrivateIP

func (client *AliCloudClientWrapper) GetPrivateIP(machine *machinev1beta1.Machine) (string, error)

func (*AliCloudClientWrapper) GetPublicDNSName

func (client *AliCloudClientWrapper) GetPublicDNSName(machine *machinev1beta1.Machine) (string, error)

func (*AliCloudClientWrapper) GetRamRole

func (client *AliCloudClientWrapper) GetRamRole(machine *machinev1beta1.Machine) (string, error)

GetRamRole gets RAM role

func (*AliCloudClientWrapper) GetRunningInstances

func (client *AliCloudClientWrapper) GetRunningInstances(machine *machinev1beta1.Machine) ([]interface{}, error)

func (*AliCloudClientWrapper) GetSecurityGroups

func (client *AliCloudClientWrapper) GetSecurityGroups(machine *machinev1beta1.Machine) ([]string, error)

GetSecurityGroups gets security groups

func (*AliCloudClientWrapper) GetTags

func (client *AliCloudClientWrapper) GetTags(machine *machinev1beta1.Machine) (map[string]string, error)

GetTags gets tags