Documentation ¶
Index ¶
- Constants
- type Actuator
- func (a *Actuator) Create(context context.Context, cluster *clusterv1.Cluster, ...) error
- func (a *Actuator) CreateMachine(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (*ec2.Instance, error)
- func (a *Actuator) Delete(context context.Context, cluster *clusterv1.Cluster, ...) error
- func (a *Actuator) DeleteMachine(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error
- func (a *Actuator) Describe(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (*ec2.Instance, error)
- func (a *Actuator) Exists(context context.Context, cluster *clusterv1.Cluster, ...) (bool, error)
- func (a *Actuator) Update(context context.Context, cluster *clusterv1.Cluster, ...) error
- type ActuatorParams
- type AwsClientWrapper
- func (client *AwsClientWrapper) GetAvailabilityZone(machine *clusterv1alpha1.Machine) (string, error)
- func (client *AwsClientWrapper) GetIAMRole(machine *clusterv1alpha1.Machine) (string, error)
- func (client *AwsClientWrapper) GetPrivateIP(machine *clusterv1alpha1.Machine) (string, error)
- func (client *AwsClientWrapper) GetPublicDNSName(machine *clusterv1alpha1.Machine) (string, error)
- func (client *AwsClientWrapper) GetRunningInstances(machine *clusterv1alpha1.Machine) ([]interface{}, error)
- func (client *AwsClientWrapper) GetSecurityGroups(machine *clusterv1alpha1.Machine) ([]string, error)
- func (client *AwsClientWrapper) GetSubnet(machine *clusterv1alpha1.Machine) (string, error)
- func (client *AwsClientWrapper) GetTags(machine *clusterv1alpha1.Machine) (map[string]string, error)
Constants ¶
const ( // MachineCreationSucceeded indicates success for machine creation MachineCreationSucceeded = "MachineCreationSucceeded" // MachineCreationFailed indicates that machine creation failed MachineCreationFailed = "MachineCreationFailed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actuator ¶
type Actuator struct {
// contains filtered or unexported fields
}
Actuator is the AWS-specific actuator for the Cluster API machine controller
func NewActuator ¶
func NewActuator(params ActuatorParams) (*Actuator, error)
NewActuator returns a new AWS Actuator
func (*Actuator) Create ¶
func (a *Actuator) Create(context context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error
Create runs a new EC2 instance
func (*Actuator) CreateMachine ¶
func (a *Actuator) CreateMachine(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (*ec2.Instance, error)
CreateMachine starts a new AWS instance as described by the cluster and machine resources
func (*Actuator) Delete ¶
func (a *Actuator) Delete(context context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error
Delete deletes a machine and updates its finalizer
func (*Actuator) DeleteMachine ¶
DeleteMachine deletes an AWS instance
func (*Actuator) Describe ¶
func (a *Actuator) Describe(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (*ec2.Instance, error)
Describe provides information about machine's instance(s)
func (*Actuator) Exists ¶
func (a *Actuator) Exists(context context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error)
Exists determines if the given machine currently exists. For AWS we query for instances in running state, with a matching name tag, to determine a match.
func (*Actuator) Update ¶
func (a *Actuator) Update(context context.Context, cluster *clusterv1.Cluster, machine *clusterv1.Machine) error
Update attempts to sync machine state with an existing instance. Today this just updates status for details that may have changed. (IPs and hostnames) We do not currently support making any changes to actual machines in AWS. Instead these will be replaced via MachineDeployments.
type ActuatorParams ¶
type ActuatorParams struct { Client client.Client Config *rest.Config AwsClientBuilder awsclient.AwsClientBuilderFuncType Codec *providerconfigv1.AWSProviderConfigCodec EventRecorder record.EventRecorder }
ActuatorParams holds parameter information for Actuator
type AwsClientWrapper ¶
type AwsClientWrapper struct {
// contains filtered or unexported fields
}
AwsClientWrapper implements CloudProviderClient for aws e2e framework
func NewAwsClientWrapper ¶
func NewAwsClientWrapper(client awsclient.Client) *AwsClientWrapper
NewAwsClientWrapper returns aws client implementaton of CloudProviderClient used for testing in CI environmet
func (*AwsClientWrapper) GetAvailabilityZone ¶
func (client *AwsClientWrapper) GetAvailabilityZone(machine *clusterv1alpha1.Machine) (string, error)
GetAvailabilityZone gets availability zone
func (*AwsClientWrapper) GetIAMRole ¶
func (client *AwsClientWrapper) GetIAMRole(machine *clusterv1alpha1.Machine) (string, error)
GetIAMRole gets IAM role
func (*AwsClientWrapper) GetPrivateIP ¶
func (client *AwsClientWrapper) GetPrivateIP(machine *clusterv1alpha1.Machine) (string, error)
GetPrivateIP gets private IP
func (*AwsClientWrapper) GetPublicDNSName ¶
func (client *AwsClientWrapper) GetPublicDNSName(machine *clusterv1alpha1.Machine) (string, error)
GetPublicDNSName gets running instance public DNS name
func (*AwsClientWrapper) GetRunningInstances ¶
func (client *AwsClientWrapper) GetRunningInstances(machine *clusterv1alpha1.Machine) ([]interface{}, error)
GetRunningInstances gets running instances (of a given cloud provider) managed by the machine object
func (*AwsClientWrapper) GetSecurityGroups ¶
func (client *AwsClientWrapper) GetSecurityGroups(machine *clusterv1alpha1.Machine) ([]string, error)
GetSecurityGroups gets security groups
func (*AwsClientWrapper) GetSubnet ¶
func (client *AwsClientWrapper) GetSubnet(machine *clusterv1alpha1.Machine) (string, error)
GetSubnet gets subnet
func (*AwsClientWrapper) GetTags ¶
func (client *AwsClientWrapper) GetTags(machine *clusterv1alpha1.Machine) (map[string]string, error)
GetTags gets tags