Documentation ¶
Index ¶
Constants ¶
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) }
type ELBv2APIClient ¶
type ELBv2APIClient interface { elbv2.DescribeTargetGroupsAPIClient elbv2.DescribeLoadBalancersAPIClient elbv2.DescribeListenersAPIClient DescribeRules(ctx context.Context, params *elbv2.DescribeRulesInput, optFns ...func(*elbv2.Options)) (*elbv2.DescribeRulesOutput, error) DescribeTags(ctx context.Context, params *elbv2.DescribeTagsInput, optFns ...func(*elbv2.Options)) (*elbv2.DescribeTagsOutput, error) }
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