mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #92227 from M00nF1sh/nlb_vpc_cidr
fix aws loadbalancer vpc cidr calculation
This commit is contained in:
commit
c232e4fae9
@ -721,6 +721,9 @@ func (c *Cloud) getVpcCidrBlocks() ([]string, error) {
|
||||
|
||||
cidrBlocks := make([]string, 0, len(vpcs.Vpcs[0].CidrBlockAssociationSet))
|
||||
for _, cidr := range vpcs.Vpcs[0].CidrBlockAssociationSet {
|
||||
if aws.StringValue(cidr.CidrBlockState.State) != ec2.VpcCidrBlockStateCodeAssociated {
|
||||
continue
|
||||
}
|
||||
cidrBlocks = append(cidrBlocks, aws.StringValue(cidr.CidrBlock))
|
||||
}
|
||||
return cidrBlocks, nil
|
||||
|
Loading…
Reference in New Issue
Block a user