Merge pull request #12582 from johngmyers/byo-ipv6

Support BYO IPv6
This commit is contained in:
Kubernetes Prow Robot 2021-10-22 23:42:20 -07:00 committed by GitHub
commit 93b94be3f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -138,6 +138,8 @@ func findVPCIPv6CIDR(cloud awsup.AWSCloud, vpcID *string) (*string, error) {
return nil, err
}
var byoIPv6CidrBlock *string
for _, association := range vpc.Ipv6CidrBlockAssociationSet {
if association == nil || association.Ipv6CidrBlockState == nil {
continue
@ -151,7 +153,11 @@ func findVPCIPv6CIDR(cloud awsup.AWSCloud, vpcID *string) (*string, error) {
if aws.StringValue(association.Ipv6Pool) == "Amazon" {
return association.Ipv6CidrBlock, nil
}
if byoIPv6CidrBlock == nil {
byoIPv6CidrBlock = association.Ipv6CidrBlock
}
}
return nil, nil
return byoIPv6CidrBlock, nil
}