mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 03:11:40 +00:00
fix aws loadbalancer vpc cidr calculation
This commit is contained in:
parent
98f250f883
commit
baffba16b8
@ -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