kubernetes-sigs/aws-load-balancer-controller

[Feature request]: Declarative defaults for subnets selected when there are multiple qualified

Aberta

#4.046 aberto em 12 de fev. de 2025

 (6 comentários) (0 reação) (1 responsável)Go (1.644 forks)auto 404
good first issuekind/feature

Métricas do repositório

Stars
 (4.317 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Describe the feature you are requesting

The ability the set default subnets that AWS Loadbalancer chooses, when there are multiple subnets to choose from.

Motivation

We have EKS clusters that span multiple subnets for different functions. e.g. Application, Database, Proxies etc. Most of our services are configured with an annotation, so they choose the correct subnet, but occasionally a service slips by without this annotation. This causes AWS loadbalancer controller to choose a subnet for the service in less then desirable fashion, as described here: https://github.com/kubernetes-sigs/aws-load-balancer-controller/blob/57472c44170f0f75df67bb5b6e83b75a2db03231/docs/deploy/subnet_discovery.md?plain=1#L5C63-L6C25

Describe the proposed solution you'd like

Make it so we can configure a flag for "default" subnets that it selects. e.g. if you have the following subnets

subnet-a subnet-b subnet-c subnet-d

you could choose subnet-c, subnet-d to be assigned as the subnets. Applications that would like to use subnet-a and subnet-b could do so by using the aws-load-balancer-subnets annotation

Describe alternatives you've considered

If this feature cannot be created, likely we will look into enforcing all service objects to declare the aws-load-balancer-subnets annotation via a policy tool like Kyverno

Contribution Intention (Optional)

-[ ] Yes, I am willing to contribute a PR to implement this feature -[x] No, I cannot work on a PR at this time

Guia do colaborador