Documentation ¶
Index ¶
- Constants
- type Service
- func (s *Service) CreateOrGetMachine(machine *actuators.MachineScope, bootstrapToken, kubeConfig string) (*v1alpha1.Instance, error)
- func (s *Service) DeleteBastion() error
- func (s *Service) DeleteNetwork() (err error)
- func (s *Service) GetConsoleOutput(instanceID string) (string, error)
- func (s *Service) GetCoreSecurityGroups(machine *actuators.MachineScope) ([]string, error)
- func (s *Service) GetInstanceSecurityGroups(instanceID string) (map[string][]string, error)
- func (s *Service) InstanceByTags(machine *actuators.MachineScope) (*v1alpha1.Instance, error)
- func (s *Service) InstanceIfExists(id *string) (*v1alpha1.Instance, error)
- func (s *Service) MachineExists(machine *actuators.MachineScope) (bool, error)
- func (s *Service) ReconcileBastion() error
- func (s *Service) ReconcileNetwork() (err error)
- func (s *Service) SDKToInstance(v *ec2.Instance) (*v1alpha1.Instance, error)
- func (s *Service) TerminateInstance(instanceID string) error
- func (s *Service) TerminateInstanceAndWait(instanceID string) error
- func (s *Service) UpdateInstanceSecurityGroups(instanceID string, ids []string) error
- func (s *Service) UpdateResourceTags(resourceID *string, create map[string]string, remove map[string]string) error
Constants ¶
const ( // IPProtocolTCP is how EC2 represents the TCP protocol in ingress rules IPProtocolTCP = "tcp" // IPProtocolUDP is how EC2 represents the UDP protocol in ingress rules IPProtocolUDP = "udp" // IPProtocolICMP is how EC2 represents the ICMP protocol in ingress rules IPProtocolICMP = "icmp" // IPProtocolICMPv6 is how EC2 represents the ICMPv6 protocol in ingress rules IPProtocolICMPv6 = "58" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service holds a collection of interfaces. The interfaces are broken down like this to group functions together. One alternative is to have a large list of functions from the ec2 client.
func NewService ¶
NewService returns a new service given the ec2 api client.
func (*Service) CreateOrGetMachine ¶
func (s *Service) CreateOrGetMachine(machine *actuators.MachineScope, bootstrapToken, kubeConfig string) (*v1alpha1.Instance, error)
CreateOrGetMachine will either return an existing instance or create and return an instance.
func (*Service) DeleteBastion ¶
DeleteBastion deletes the Bastion instance
func (*Service) DeleteNetwork ¶
DeleteNetwork deletes the network of the given cluster.
func (*Service) GetConsoleOutput ¶
GetConsoleOutput returns the latest console output of an instance
func (*Service) GetCoreSecurityGroups ¶ added in v0.3.0
func (s *Service) GetCoreSecurityGroups(machine *actuators.MachineScope) ([]string, error)
func (*Service) GetInstanceSecurityGroups ¶ added in v0.3.0
GetInstanceSecurityGroups returns a map from ENI id to the security groups applied to that ENI While some security group operations take place at the "instance" level, these are in fact an API convenience for manipulating the first ("primary") ENI's properties.
func (*Service) InstanceByTags ¶
InstanceByTags returns the existing instance or nothing if it doesn't exist.
func (*Service) InstanceIfExists ¶
InstanceIfExists returns the existing instance or nothing if it doesn't exist.
func (*Service) MachineExists ¶
func (s *Service) MachineExists(machine *actuators.MachineScope) (bool, error)
MachineExists will return whether or not a machine exists.
func (*Service) ReconcileBastion ¶
ReconcileBastion ensures a bastion is created for the cluster
func (*Service) ReconcileNetwork ¶
ReconcileNetwork reconciles the network of the given cluster.
func (*Service) SDKToInstance ¶ added in v0.2.1
SDKToInstance converts an AWS EC2 SDK instance to the CAPA instance type. converters.SDKToInstance populates all instance fields except for rootVolumeSize, because EC2.DescribeInstances does not return the size of storage devices. An additional call to EC2 is required to get this value.
func (*Service) TerminateInstance ¶
TerminateInstance terminates an EC2 instance. Returns nil on success, error in all other cases.
func (*Service) TerminateInstanceAndWait ¶
TerminateInstanceAndWait terminates and waits for an EC2 instance to terminate.
func (*Service) UpdateInstanceSecurityGroups ¶
UpdateInstanceSecurityGroups modifies the security groups of the given EC2 instance.
func (*Service) UpdateResourceTags ¶
func (s *Service) UpdateResourceTags(resourceID *string, create map[string]string, remove map[string]string) error
UpdateResourceTags updates the tags for an instance. This will be called if there is anything to create (update) or delete. We may not always have to perform each action, so we check what we're receiving to avoid calling AWS if we don't need to.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_ec2iface is a generated GoMock package.
|
Package mock_ec2iface is a generated GoMock package. |