You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We are using service.beta.kubernetes.io/aws-load-balancer-eip-allocations and service.beta.kubernetes.io/aws-load-balancer-subnets annotations to create a mapping between EIP and subnets.
As per docs , EIP allocations has this side note Length/order must match subnets
However this order is not respected because we end up sorting the list of subnets.
The mapping of the NLB created should be
eip-w -> subnet-random-ewewe
eip-x -> subnet-random-wewe
eip-y -> subnet-random-qrqr,
eip-z -> subnet-random-rqrq
Current outcome
The mapping which ends up being created is
Describe the bug
We are using
service.beta.kubernetes.io/aws-load-balancer-eip-allocations
andservice.beta.kubernetes.io/aws-load-balancer-subnets
annotations to create a mapping between EIP and subnets.As per docs , EIP allocations has this side note
Length/order must match subnets
However this order is not respected because we end up sorting the list of subnets.
aws-load-balancer-controller/pkg/networking/subnet_resolver.go
Line 461 in 990ee2e
As a result, we end up mapping EIP to subnets which we don't intend (want) to
Steps to reproduce
Deployed k8s manifest example
Expected outcome
A concise description of what you expected to happen.
When we set these annotations
The mapping of the NLB created should be
eip-w -> subnet-random-ewewe
eip-x -> subnet-random-wewe
eip-y -> subnet-random-qrqr,
eip-z -> subnet-random-rqrq
Current outcome
The mapping which ends up being created is
eip-w -> subnet-random-ewewe
eip-x -> subnet-random-qrqr
eip-y -> subnet-random-rqrq
eip-z -> subnet-random-wewe
Environment
Additional Context:
The text was updated successfully, but these errors were encountered: