Skip to content

Commit

Permalink
in dual stack env, support only ipv4 or ipv6 address in SpiderSubnet …
Browse files Browse the repository at this point in the history
…feature (#2205)

Signed-off-by: Icarus9913 <[email protected]>
  • Loading branch information
Icarus9913 authored Aug 21, 2023
1 parent 111951b commit 8b6b5ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/ipam/pool_selections.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ func (i *ipam) getPoolFromSubnetAnno(ctx context.Context, pod *corev1.Pod, nic s
return nil, fmt.Errorf("there are no subnet specified: %v", subnetAnnoConfig)
}

if i.config.EnableIPv4 && len(subnetItem.IPv4) == 0 {
return nil, fmt.Errorf("the pod subnetAnnotation doesn't specify IPv4 SpiderSubnet")
}
if i.config.EnableIPv6 && len(subnetItem.IPv6) == 0 {
return nil, fmt.Errorf("the pod subnetAnnotation doesn't specify IPv6 SpiderSubnet")
}
//if i.config.EnableIPv4 && len(subnetItem.IPv4) == 0 {
// return nil, fmt.Errorf("the pod subnetAnnotation doesn't specify IPv4 SpiderSubnet")
//}
//if i.config.EnableIPv6 && len(subnetItem.IPv6) == 0 {
// return nil, fmt.Errorf("the pod subnetAnnotation doesn't specify IPv6 SpiderSubnet")
//}

result := &ToBeAllocated{
NIC: nic,
Expand Down

0 comments on commit 8b6b5ea

Please sign in to comment.