Skip to content

Commit

Permalink
Merge pull request spidernet-io#2821 from Icarus9913/feat/wk/subnet-s…
Browse files Browse the repository at this point in the history
…ingle-ip

support spidersubnet single IP in dual stack
  • Loading branch information
weizhoublue authored Dec 12, 2023
2 parents 70c9fab + 6ab131f commit 3cfbab9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions pkg/applicationcontroller/app_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -783,13 +783,6 @@ func (sac *SubnetAppController) applyAutoIPPool(ctx context.Context, podSubnetCo
}

processNext := func(item types.AnnoSubnetItem) error {
if sac.EnableIPv4 && len(item.IPv4) == 0 {
return fmt.Errorf("IPv4 SpiderSubnet not specified when configuration enableIPv4 is on")
}
if sac.EnableIPv6 && len(item.IPv6) == 0 {
return fmt.Errorf("IPv6 SpiderSubnet not specified when configuration enableIPv6 is on")
}

var errV4, errV6 error
var wg sync.WaitGroup
if sac.EnableIPv4 && len(item.IPv4) != 0 {
Expand Down
7 changes: 0 additions & 7 deletions pkg/ipam/pool_selections.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,6 @@ 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")
//}

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

0 comments on commit 3cfbab9

Please sign in to comment.