Documentation ¶
Index ¶
Constants ¶
View Source
const ( // AwsCredsSecretIDKey is secret key containing AWS KeyId AwsCredsSecretIDKey = "awsAccessKeyId" // AwsCredsSecretAccessKey is secret key containing AWS Secret Key AwsCredsSecretAccessKey = "awsSecretAccessKey" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsClientBuilderFuncType ¶
type AwsClientBuilderFuncType func(client client.Client, secretName, namespace, region string) (Client, error)
AwsClientBuilderFuncType is function type for building aws client
type Client ¶
type Client interface { DescribeImages(*ec2.DescribeImagesInput) (*ec2.DescribeImagesOutput, error) DescribeVpcs(*ec2.DescribeVpcsInput) (*ec2.DescribeVpcsOutput, error) DescribeSubnets(*ec2.DescribeSubnetsInput) (*ec2.DescribeSubnetsOutput, error) DescribeAvailabilityZones(*ec2.DescribeAvailabilityZonesInput) (*ec2.DescribeAvailabilityZonesOutput, error) DescribeSecurityGroups(*ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error) RunInstances(*ec2.RunInstancesInput) (*ec2.Reservation, error) DescribeInstances(*ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error) TerminateInstances(*ec2.TerminateInstancesInput) (*ec2.TerminateInstancesOutput, error) RegisterInstancesWithLoadBalancer(*elb.RegisterInstancesWithLoadBalancerInput) (*elb.RegisterInstancesWithLoadBalancerOutput, error) ELBv2DescribeLoadBalancers(*elbv2.DescribeLoadBalancersInput) (*elbv2.DescribeLoadBalancersOutput, error) ELBv2DescribeTargetGroups(*elbv2.DescribeTargetGroupsInput) (*elbv2.DescribeTargetGroupsOutput, error) ELBv2RegisterTargets(*elbv2.RegisterTargetsInput) (*elbv2.RegisterTargetsOutput, error) }
Client is a wrapper object for actual AWS SDK clients to allow for easier testing.
func NewClient ¶
func NewClient(ctrlRuntimeClient client.Client, secretName, namespace, region string) (Client, error)
NewClient creates our client wrapper object for the actual AWS clients we use. For authentication the underlying clients will use either the cluster AWS credentials secret if defined (i.e. in the root cluster), otherwise the IAM profile of the master where the actuator will run. (target clusters)
func NewClientFromKeys ¶
NewClientFromKeys creates our client wrapper object for the actual AWS clients we use. For authentication the underlying clients will use AWS credentials.
Click to show internal directories.
Click to hide internal directories.