Documentation ¶
Overview ¶
Package services contains the interfaces for the AWS services.
Index ¶
Constants ¶
const ( // TemporaryResourceID is the name used temporarily when creating AWS resources. TemporaryResourceID = "temporary-resource-id" // AnyIPv4CidrBlock is the CIDR block to match all IPv4 addresses. AnyIPv4CidrBlock = "0.0.0.0/0" // AnyIPv6CidrBlock is the CIDR block to match all IPv6 addresses. AnyIPv6CidrBlock = "::/0" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASGInterface ¶
type ASGInterface interface { ASGIfExists(id *string) (*expinfrav1.AutoScalingGroup, error) GetASGByName(scope *scope.MachinePoolScope) (*expinfrav1.AutoScalingGroup, error) CreateASG(scope *scope.MachinePoolScope) (*expinfrav1.AutoScalingGroup, error) UpdateASG(scope *scope.MachinePoolScope) error StartASGInstanceRefresh(scope *scope.MachinePoolScope) error CanStartASGInstanceRefresh(scope *scope.MachinePoolScope) (bool, error) UpdateResourceTags(resourceID *string, create, remove map[string]string) error DeleteASGAndWait(id string) error SuspendProcesses(name string, processes []string) error ResumeProcesses(name string, processes []string) error SubnetIDs(scope *scope.MachinePoolScope) ([]string, error) }
ASGInterface encapsulates the methods exposed to the machinepool actuator.
type AWSNodeInterface ¶ added in v2.5.0
AWSNodeInterface installs the CNI for EKS clusters.
type EC2Interface ¶
type EC2Interface interface { InstanceIfExists(id *string) (*infrav1.Instance, error) TerminateInstance(id string) error CreateInstance(scope *scope.MachineScope, userData []byte, userDataFormat string) (*infrav1.Instance, error) GetRunningInstanceByTags(scope *scope.MachineScope) (*infrav1.Instance, error) GetAdditionalSecurityGroupsIDs(securityGroup []infrav1.AWSResourceReference) ([]string, error) GetCoreSecurityGroups(machine *scope.MachineScope) ([]string, error) GetInstanceSecurityGroups(instanceID string) (map[string][]string, error) UpdateInstanceSecurityGroups(id string, securityGroups []string) error UpdateResourceTags(resourceID *string, create, remove map[string]string) error ModifyInstanceMetadataOptions(instanceID string, options *infrav1.InstanceMetadataOptions) error TerminateInstanceAndWait(instanceID string) error DetachSecurityGroupsFromNetworkInterface(groups []string, interfaceID string) error DiscoverLaunchTemplateAMI(scope scope.LaunchTemplateScope) (*string, error) GetLaunchTemplate(id string) (lt *expinfrav1.AWSLaunchTemplate, userDataHash string, userDataSecretKey *apimachinerytypes.NamespacedName, err error) GetLaunchTemplateID(id string) (string, error) GetLaunchTemplateLatestVersion(id string) (string, error) CreateLaunchTemplate(scope scope.LaunchTemplateScope, imageID *string, userDataSecretKey apimachinerytypes.NamespacedName, userData []byte) (string, error) CreateLaunchTemplateVersion(id string, scope scope.LaunchTemplateScope, imageID *string, userDataSecretKey apimachinerytypes.NamespacedName, userData []byte) error PruneLaunchTemplateVersions(id string) error DeleteLaunchTemplate(id string) error LaunchTemplateNeedsUpdate(scope scope.LaunchTemplateScope, incoming *expinfrav1.AWSLaunchTemplate, existing *expinfrav1.AWSLaunchTemplate) (bool, error) DeleteBastion() error ReconcileBastion() error // ReconcileElasticIPFromPublicPool reconciles the elastic IP from a custom Public IPv4 Pool. ReconcileElasticIPFromPublicPool(pool *infrav1.ElasticIPPool, instance *infrav1.Instance) (bool, error) // ReleaseElasticIP reconciles the elastic IP from a custom Public IPv4 Pool. ReleaseElasticIP(instanceID string) error }
EC2Interface encapsulates the methods exposed to the machine actuator.
type ELBInterface ¶
type ELBInterface interface { DeleteLoadbalancers() error ReconcileLoadbalancers() error IsInstanceRegisteredWithAPIServerELB(i *infrav1.Instance) (bool, error) IsInstanceRegisteredWithAPIServerLB(i *infrav1.Instance, lb *infrav1.AWSLoadBalancerSpec) ([]string, bool, error) DeregisterInstanceFromAPIServerELB(i *infrav1.Instance) error DeregisterInstanceFromAPIServerLB(targetGroupArn string, i *infrav1.Instance) error RegisterInstanceWithAPIServerELB(i *infrav1.Instance) error RegisterInstanceWithAPIServerLB(i *infrav1.Instance, lb *infrav1.AWSLoadBalancerSpec) error }
ELBInterface encapsulates the methods exposed to the cluster and machine controller.
type IAMAuthenticatorInterface ¶ added in v2.5.0
IAMAuthenticatorInterface installs aws-iam-authenticator for EKS clusters.
type KubeProxyInterface ¶ added in v2.5.0
KubeProxyInterface installs kube-proxy for EKS clusters.
type MachinePoolReconcileInterface ¶ added in v2.4.0
type MachinePoolReconcileInterface interface { ReconcileLaunchTemplate(scope scope.LaunchTemplateScope, ec2svc EC2Interface, canUpdateLaunchTemplate func() (bool, error), runPostLaunchTemplateUpdateOperation func() error) error ReconcileTags(scope scope.LaunchTemplateScope, resourceServicesToUpdate []scope.ResourceServiceToUpdate) error }
MachinePoolReconcileInterface encapsulates high-level reconciliation functions regarding EC2 reconciliation. It is separate from EC2Interface so that we can mock AWS requests separately. For example, by not mocking the ReconcileLaunchTemplate function, but mocking EC2Interface, we can test which EC2 API operations would have been called.
type NetworkInterface ¶
NetworkInterface encapsulates the methods exposed to the cluster controller.
type ObjectStoreInterface ¶
type ObjectStoreInterface interface { DeleteBucket() error ReconcileBucket() error Delete(m *scope.MachineScope) error Create(m *scope.MachineScope, data []byte) (objectURL string, err error) }
ObjectStoreInterface encapsulates the methods exposed to the machine actuator.
type SecretInterface ¶
type SecretInterface interface { Delete(m *scope.MachineScope) error Create(m *scope.MachineScope, data []byte) (string, int32, error) UserData(secretPrefix string, chunks int32, region string, endpoints []scope.ServiceEndpoint) ([]byte, error) }
SecretInterface encapsulated the methods exposed to the machine actuator.
type SecurityGroupInterface ¶
type SecurityGroupInterface interface { DeleteSecurityGroups() error ReconcileSecurityGroups() error }
SecurityGroupInterface encapsulates the methods exposed to the cluster controller.
Directories ¶
Path | Synopsis |
---|---|
Package asg provides a service for managing AWS AutoScalingGroups.
|
Package asg provides a service for managing AWS AutoScalingGroups. |
mock_autoscalingiface
Package mock_autoscalingiface is a generated GoMock package.
|
Package mock_autoscalingiface is a generated GoMock package. |
Package awsnode provides a way to interact with AWS nodes.
|
Package awsnode provides a way to interact with AWS nodes. |
Package ec2 provides a way to interact with the AWS EC2 API.
|
Package ec2 provides a way to interact with the AWS EC2 API. |
Package eks provides a service to reconcile EKS control plane and nodegroups.
|
Package eks provides a service to reconcile EKS control plane and nodegroups. |
iam
Package iam provides a service for managing IAM roles and policies.
|
Package iam provides a service for managing IAM roles and policies. |
mock_eksiface
Package mock_eksiface is a generated GoMock package.
|
Package mock_eksiface is a generated GoMock package. |
Package elb provides a service for managing AWS load balancers.
|
Package elb provides a service for managing AWS load balancers. |
Package gc provides a way to perform gc operations against a tenant/workload/child cluster.
|
Package gc provides a way to perform gc operations against a tenant/workload/child cluster. |
Package iamauth provides a way to interact with AWS IAM.
|
Package iamauth provides a way to interact with AWS IAM. |
mock_iamauth
Package mock_iamauth provides a mock implementation for the IAMAPI interface.
|
Package mock_iamauth provides a mock implementation for the IAMAPI interface. |
Package instancestate provides a way to interact with the EC2 instance state.
|
Package instancestate provides a way to interact with the EC2 instance state. |
mock_eventbridgeiface
Package mock_eventbridgeiface provides a mock implementation for the EventBridgeAPI interface.
|
Package mock_eventbridgeiface provides a mock implementation for the EventBridgeAPI interface. |
mock_sqsiface
Package mock_sqsiface provides a mock implementation for the SQSAPI interface.
|
Package mock_sqsiface provides a mock implementation for the SQSAPI interface. |
Package kubeproxy provides a way to interact with the kube-proxy service.
|
Package kubeproxy provides a way to interact with the kube-proxy service. |
Package mock_services is a generated GoMock package.
|
Package mock_services is a generated GoMock package. |
Package network provides a service to manage AWS network resources.
|
Package network provides a service to manage AWS network resources. |
Package s3 provides a way to interact with AWS S3.
|
Package s3 provides a way to interact with AWS S3. |
mock_s3iface
Package mock_s3iface provides a mock implementation of the s3iface.S3API interface Run go generate to regenerate this mock.
|
Package mock_s3iface provides a mock implementation of the s3iface.S3API interface Run go generate to regenerate this mock. |
mock_stsiface
Package mock_stsiface provides a mock implementation for the STSAPI interface.
|
Package mock_stsiface provides a mock implementation for the STSAPI interface. |
Package secretsmanager provides a way to interact with AWS Secrets Manager.
|
Package secretsmanager provides a way to interact with AWS Secrets Manager. |
mock_secretsmanageriface
Package mock_secretsmanageriface provides a mock interface for the SecretsManager API client.
|
Package mock_secretsmanageriface provides a mock interface for the SecretsManager API client. |
Package securitygroup provides a service to manage AWS security group resources.
|
Package securitygroup provides a service to manage AWS security group resources. |
Package ssm provides a service to generate userdata for AWS Systems Manager.
|
Package ssm provides a service to generate userdata for AWS Systems Manager. |
mock_ssmiface
Package mock_ssmiface provides a mock interface for the SSM API client.
|
Package mock_ssmiface provides a mock interface for the SSM API client. |
sts
|
|
mock_stsiface
Package mock_stsiface provides a mock implementation for the STSAPI interface.
|
Package mock_stsiface provides a mock implementation for the STSAPI interface. |
Package userdata provides a way to generate user data for cloud instances.
|
Package userdata provides a way to generate user data for cloud instances. |
Package wait provides a set of utilities for polling and waiting.
|
Package wait provides a set of utilities for polling and waiting. |