Skip to content

Commit 4cd14b6

Browse files
committed
fixing comments
1 parent b3f6924 commit 4cd14b6

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

cns/middlewares/k8sSwiftV2.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ func (k *K8sSWIFTv2Middleware) IPConfigsRequestHandlerWrapper(defaultHandler, fa
100100
}
101101
}
102102

103-
// For our purposes we would skip over this logic or need to replace it with something to check the delegated NIC
104103
// validateIPConfigsRequest validates if pod is multitenant by checking the pod labels, used in SWIFT V2 AKS scenario.
105104
// nolint
106105
func (k *K8sSWIFTv2Middleware) validateIPConfigsRequest(ctx context.Context, req *cns.IPConfigsRequest) (podInfo cns.PodInfo, respCode types.ResponseCode, message string) {

cns/restserver/ipam.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,12 +998,14 @@ func (service *HTTPRestService) AssignAvailableIPConfigs(podInfo cns.PodInfo) ([
998998
return nil, ErrNoNCs
999999
}
10001000

1001+
// Gets the IPFamilies from all NCs and stores them in a map. This will be ued to determine the amount of IPs to return
10011002
for ncID := range service.state.ContainerStatus {
10021003
for ipFamily := range service.state.ContainerStatus[ncID].CreateNetworkContainerRequest.IPFamilies {
10031004
ipFamilies[ipFamily] = struct{}{}
10041005
}
10051006
}
10061007

1008+
// Makes sure we have at least one IPFamily across all NCs
10071009
numOfIPFamilies := len(ipFamilies)
10081010
if numOfIPFamilies == 0 {
10091011
return nil, ErrNoIPFamilies

cns/restserver/restserver.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ type imdsClient interface {
5555
}
5656

5757
// HTTPRestService represents http listener for CNS - Container Networking Service.
58-
// TODO: If we add a new type of Middleware that will be reflected in the IPConfigsHandlerMiddleware value
5958
type HTTPRestService struct {
6059
*cns.Service
6160
dockerClient *dockerclient.Client

0 commit comments

Comments
 (0)