lb

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeletionProtectionEnabledKey      = "deletion_protection.enabled"
	AccessLogsS3EnabledKey            = "access_logs.s3.enabled"
	AccessLogsS3BucketKey             = "access_logs.s3.bucket"
	AccessLogsS3PrefixKey             = "access_logs.s3.prefix"
	IdleTimeoutTimeoutSecondsKey      = "idle_timeout.timeout_seconds"
	RoutingHTTP2EnabledKey            = "routing.http2.enabled"
	DropInvalidHeaderFieldsEnabledKey = "routing.http.drop_invalid_header_fields.enabled"

	DeletionProtectionEnabled      = false
	AccessLogsS3Enabled            = false
	AccessLogsS3Bucket             = ""
	AccessLogsS3Prefix             = ""
	IdleTimeoutTimeoutSeconds      = 60
	RoutingHTTP2Enabled            = true
	DropInvalidHeaderFieldsEnabled = false
)

Variables

This section is empty.

Functions

func IsInvalidAttribute

func IsInvalidAttribute(e error) bool

IsInvalidAttribute checks if the err is from an invalid attribute

func NewInvalidAttribute

func NewInvalidAttribute(name string) error

NewInvalidAttribute returns a new InvalidAttribute error

Types

type Attributes

type Attributes struct {
	// DeletionProtectionEnabled: deletion_protection.enabled - Indicates whether deletion protection
	// is enabled. The value is true or false. The default is false.
	DeletionProtectionEnabled bool

	// AccessLogsS3Enabled: access_logs.s3.enabled - Indicates whether access logs are enabled.
	// The value is true or false. The default is false.
	AccessLogsS3Enabled bool

	// AccessLogsS3Bucket: access_logs.s3.bucket - The name of the S3 bucket for the access logs.
	// This attribute is required if access logs are enabled. The bucket must
	// exist in the same region as the load balancer and have a bucket policy
	// that grants Elastic Load Balancing permissions to write to the bucket.
	AccessLogsS3Bucket string

	// AccessLogsS3Prefix: access_logs.s3.prefix - The prefix for the location in the S3 bucket
	// for the access logs.
	AccessLogsS3Prefix string

	// IdleTimeoutTimeoutSeconds: idle_timeout.timeout_seconds - The idle timeout value, in seconds. The
	// valid range is 1-4000 seconds. The default is 60 seconds.
	IdleTimeoutTimeoutSeconds int64

	// RoutingHTTP2Enabled: routing.http2.enabled - Indicates whether HTTP/2 is enabled. The value
	// is true or false. The default is true.
	RoutingHTTP2Enabled bool

	// DropInvalidHeaderFieldsEnabled: routing.http.drop_invalid_header_fields.enabled - Indicates if
	// invalid headers will be dropped. The default is false.
	DropInvalidHeaderFieldsEnabled bool
}

Attributes represents the desired state of attributes for a load balancer.

func NewAttributes

func NewAttributes(attrs []*elbv2.LoadBalancerAttribute) (a *Attributes, err error)

type AttributesController

type AttributesController interface {
	// Reconcile ensures the load balancer attributes in AWS matches the state specified by the ingress configuration.
	Reconcile(ctx context.Context, lbArn string, attrs []*elbv2.LoadBalancerAttribute) error
}

AttributesController provides functionality to manage Attributes

func NewAttributesController

func NewAttributesController(cloud aws.CloudAPI) AttributesController

NewAttributesController constructs a new attributes controller

type Controller

type Controller interface {
	// Reconcile will make sure an LoadBalancer exists for specified ingress.
	Reconcile(ctx context.Context, ingress *extensions.Ingress) (*LoadBalancer, error)

	// Deletes will ensure no LoadBalancer exists for specified ingressKey.
	Delete(ctx context.Context, ingressKey types.NamespacedName) error
}

LoadBalancerController manages loadBalancer for ingress objects

func NewController

func NewController(
	cloud aws.CloudAPI,
	store store.Storer,
	nameTagGen NameTagGenerator,
	tgGroupController tg.GroupController,
	lsGroupController ls.GroupController,
	sgAssociationController sg.AssociationController,
	tagsController tags.Controller) Controller

type InvalidAttribute

type InvalidAttribute struct {
	Name string
}

InvalidAttribute error

func (InvalidAttribute) Error

func (e InvalidAttribute) Error() string

type LoadBalancer

type LoadBalancer struct {
	Arn     string
	DNSName string
}

LoadBalancer contains information of LoadBalancer in AWS

type NameGenerator

type NameGenerator interface {
	NameLB(namespace string, ingressName string) string
}

NameGenerator generates name for loadBalancer resources

type NameTagGenerator

type NameTagGenerator interface {
	NameGenerator
	TagGenerator
}

NameTagGenerator combines NameGenerator & TagGenerator

type ShieldController added in v1.1.6

type ShieldController interface {
	Reconcile(ctx context.Context, lbArn string, ingress *extensions.Ingress) error
}

ShieldController provides functionality to manage ALB's Shield Advanced protection.

func NewShieldController added in v1.1.6

func NewShieldController(cloud aws.CloudAPI) ShieldController

type TagGenerator

type TagGenerator interface {
	TagLB(namespace string, ingressName string) map[string]string
}

TagGenerator generates tags for loadBalancer resources

type WAFController added in v1.1.5

type WAFController interface {
	Reconcile(ctx context.Context, lbArn string, ingress *extensions.Ingress) error
}

WAFController provides functionality to manage ALB's WAF associations.

func NewWAFController added in v1.1.5

func NewWAFController(cloud aws.CloudAPI) WAFController

type WAFV2Controller added in v1.1.7

type WAFV2Controller interface {
	Reconcile(ctx context.Context, lbArn string, ingress *extensions.Ingress) error
}

WAFCV2ontroller provides functionality to manage ALB's WAF V2 associations.

func NewWAFV2Controller added in v1.1.7

func NewWAFV2Controller(cloud aws.CloudAPI) WAFV2Controller

Jump to

Keyboard shortcuts

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