subnet

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultProvider added in v0.36.0

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

func NewDefaultProvider added in v0.36.0

func NewDefaultProvider(ec2api ec2iface.EC2API, cache *cache.Cache) *DefaultProvider

func (*DefaultProvider) CheckAnyPublicIPAssociations added in v0.36.0

func (p *DefaultProvider) CheckAnyPublicIPAssociations(ctx context.Context, nodeClass *v1beta1.EC2NodeClass) (bool, error)

CheckAnyPublicIPAssociations returns a bool indicating whether all referenced subnets assign public IPv4 addresses to EC2 instances created therein

func (*DefaultProvider) List added in v0.36.0

func (p *DefaultProvider) List(ctx context.Context, nodeClass *v1beta1.EC2NodeClass) ([]*ec2.Subnet, error)

func (*DefaultProvider) LivenessProbe added in v0.36.0

func (p *DefaultProvider) LivenessProbe(_ *http.Request) error

func (*DefaultProvider) UpdateInflightIPs added in v0.36.0

func (p *DefaultProvider) 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 (*DefaultProvider) ZonalSubnetsForLaunch added in v0.36.0

func (p *DefaultProvider) ZonalSubnetsForLaunch(ctx context.Context, nodeClass *v1beta1.EC2NodeClass, 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

type Provider

type Provider interface {
	LivenessProbe(*http.Request) error
	List(context.Context, *v1beta1.EC2NodeClass) ([]*ec2.Subnet, error)
	CheckAnyPublicIPAssociations(context.Context, *v1beta1.EC2NodeClass) (bool, error)
	ZonalSubnetsForLaunch(context.Context, *v1beta1.EC2NodeClass, []*cloudprovider.InstanceType, string) (map[string]*ec2.Subnet, error)
	UpdateInflightIPs(*ec2.CreateFleetInput, *ec2.CreateFleetOutput, []*cloudprovider.InstanceType, []*ec2.Subnet, string)
}

Jump to

Keyboard shortcuts

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