elb

package
v2.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package elb provides a service for managing AWS load balancers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ELBName

func ELBName(s scope.ELBScope) (string, error)

ELBName returns the user-defined API Server ELB name, or a generated default if the user has not defined the ELB name. This is only for the primary load balancer.

func GenerateELBName

func GenerateELBName(clusterName string) (string, error)

GenerateELBName generates a formatted ELB name via either concatenating the cluster name to the "-apiserver" suffix or computing a hash for clusters with names above 32 characters.

WARNING If this function's output is changed, a controller using the new function will fail to generate the load balancer of an existing cluster whose load balancer name was generated using the old function.

func IsAccessDenied

func IsAccessDenied(err error) bool

IsAccessDenied returns true if the error is AccessDenied.

func IsConflict

func IsConflict(err error) bool

IsConflict returns true if the error was created by NewConflict.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the error was created by NewNotFound.

func IsSDKError

func IsSDKError(err error) (ok bool)

IsSDKError returns true if the error is of type awserr.Error.

func LBName added in v2.1.0

func LBName(s scope.ELBScope, lbSpec *infrav1.AWSLoadBalancerSpec) (string, error)

LBName returns the user-defined API Server LB name, or a generated default if the user has not defined the LB name. This is used for both the primary and secondary load balancers.

func NewConflict

func NewConflict(msg string) error

NewConflict returns an error which indicates that the request cannot be processed due to a conflict.

func NewNotFound

func NewNotFound(msg string) error

NewNotFound returns an error which indicates that the resource of the kind and the name was not found.

func ReasonForError

func ReasonForError(err error) int

ReasonForError returns the HTTP status for a particular error.

Types

type ELBError

type ELBError struct {
	Code int
	// contains filtered or unexported fields
}

ELBError is an error exposed to users of this library.

func (*ELBError) Error

func (e *ELBError) Error() string

Error implements the Error interface.

type Service

type Service struct {
	EC2Client             ec2iface.EC2API
	ELBClient             elbiface.ELBAPI
	ELBV2Client           elbv2iface.ELBV2API
	ResourceTaggingClient resourcegroupstaggingapiiface.ResourceGroupsTaggingAPIAPI
	// 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

func NewService(elbScope scope.ELBScope) *Service

NewService returns a new service given the api clients.

func (*Service) DeleteLoadbalancers

func (s *Service) DeleteLoadbalancers() error

DeleteLoadbalancers deletes the load balancers for the given cluster.

func (*Service) DeregisterInstanceFromAPIServerELB

func (s *Service) DeregisterInstanceFromAPIServerELB(i *infrav1.Instance) error

DeregisterInstanceFromAPIServerELB de-registers an instance from a classic ELB.

func (*Service) DeregisterInstanceFromAPIServerLB added in v2.1.0

func (s *Service) DeregisterInstanceFromAPIServerLB(targetGroupArn string, i *infrav1.Instance) error

DeregisterInstanceFromAPIServerLB de-registers an instance from a LB.

func (*Service) IsInstanceRegisteredWithAPIServerELB

func (s *Service) IsInstanceRegisteredWithAPIServerELB(i *infrav1.Instance) (bool, error)

IsInstanceRegisteredWithAPIServerELB returns true if the instance is already registered with the APIServer ELB.

func (*Service) IsInstanceRegisteredWithAPIServerLB added in v2.1.0

func (s *Service) IsInstanceRegisteredWithAPIServerLB(i *infrav1.Instance, lb *infrav1.AWSLoadBalancerSpec) ([]string, bool, error)

IsInstanceRegisteredWithAPIServerLB returns true if the instance is already registered with the APIServer LB.

func (*Service) ReconcileLoadbalancers

func (s *Service) ReconcileLoadbalancers() error

ReconcileLoadbalancers reconciles the load balancers for the given cluster.

func (*Service) RegisterInstanceWithAPIServerELB

func (s *Service) RegisterInstanceWithAPIServerELB(i *infrav1.Instance) error

RegisterInstanceWithAPIServerELB registers an instance with a classic ELB.

func (*Service) RegisterInstanceWithAPIServerLB added in v2.1.0

func (s *Service) RegisterInstanceWithAPIServerLB(instance *infrav1.Instance, lbSpec *infrav1.AWSLoadBalancerSpec) error

RegisterInstanceWithAPIServerLB registers an instance with a LB.

Jump to

Keyboard shortcuts

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