subnet

package
v0.0.0-...-5affba4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pretty

func Pretty(subnets []*ec2.Subnet) []string

Types

type Provider

type Provider struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(ec2api ec2iface.EC2API, cache *cache.Cache) *Provider

func (*Provider) List

func (p *Provider) List(ctx context.Context, nodeTemplate *v1alpha1.AWSNodeTemplate) ([]*ec2.Subnet, error)

func (*Provider) LivenessProbe

func (p *Provider) LivenessProbe(req *http.Request) error

func (*Provider) UpdateInflightIPs

func (p *Provider) UpdateInflightIPs(createFleetInput *ec2.CreateFleetInput, createFleetOutput *ec2.CreateFleetOutput, instanceTypes []*cloudprovider.InstanceType,
	subnets []*ec2.Subnet, capacityType string)

UpdateInflightIPs is used to refresh the in-memory IP usage by adding back unused IPs after a CreateFleet response is returned

func (*Provider) ZonalSubnetsForLaunch

func (p *Provider) ZonalSubnetsForLaunch(ctx context.Context, nodeTemplate *v1alpha1.AWSNodeTemplate, instanceTypes []*cloudprovider.InstanceType, capacityType string) (map[string]*ec2.Subnet, error)

ZonalSubnetsForLaunch returns a mapping of zone to the subnet with the most available IP addresses and deducts the passed ips from the available count

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL