aws

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AWSLoadBalancerV2TagKeyResourceID = "ingress.k8s.aws/resource"

AWSLoadBalancerV2TagKeyResourceID is the tag applied to an AWS resource by the AWS Load Balancer controller, to associate it to the corresponding kubernetes resource. This is used by the rollout controller to identify the correct TargetGroups associated with the LoadBalancer. For AWS target group service references, the format is: <namespace>/<ingress-name>-<service-name>:<port> Example: ingress.k8s.aws/resource: default/alb-rollout-ingress-alb-rollout-stable:80 See: https://kubernetes-sigs.github.io/aws-load-balancer-controller/guide/ingress/annotations/#resource-tags https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/2e51fbdc5dc978d66e36b376d6dc56b0ae146d8f/internal/alb/generator/tag.go#L125-L128

Variables

This section is empty.

Functions

func BuildV2TargetGroupID

func BuildV2TargetGroupID(namespace string, ingressName string, serviceName string, servicePort int32) string

BuildV2TargetGroupID returns the AWS targetGroup ResourceID that compatible with V2 version. Copied from https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/2e51fbdc5dc978d66e36b376d6dc56b0ae146d8f/internal/alb/generator/tag.go#L125-L128

Types

type Client

type Client interface {
	GetTargetGroupMetadata(ctx context.Context, loadBalancerARN string) ([]TargetGroupMeta, error)
	FindLoadBalancerByDNSName(ctx context.Context, dnsName string) (*elbv2types.LoadBalancer, error)
}

func NewClient

func NewClient() (Client, error)

type ELBv2APIClient

ELBv2APIClient is an interface that enables mocking of the ELBv2 API

type TargetGroupMeta

type TargetGroupMeta struct {
	elbv2types.TargetGroup
	Tags   map[string]string
	Weight *int32
}

TargetGroupMeta is a data type which combines the AWS TargetGroup information along with its tags, and weights

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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