Skip to content

Commit a15ee32

Browse files
fix: address comments
1 parent 2b210d6 commit a15ee32

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cns/restserver/nodesubnet.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ func (service *HTTPRestService) UpdateIPsForNodeSubnet(secondaryIPs []netip.Addr
3434
return nil
3535
}
3636

37+
// initialization steps for nodesubnet:
38+
// 1. Set orchestrator type to KubernetesCRD
39+
// 2. Reconcile initial CNS state from statefile
40+
// 3. Create the IP fetcher
3741
func (service *HTTPRestService) InitializeNodeSubnet(ctx context.Context, podInfoByIPProvider cns.PodInfoByIPProvider) error {
38-
// Set orchestrator type
42+
// set orchestrator type
3943
orchestrator := cns.SetOrchestratorTypeRequest{
4044
OrchestratorType: cns.KubernetesCRD,
4145
}

cns/service/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ func main() {
870870
}
871871
}
872872

873-
// AzureHost channelmode indeicates Nodesubnet. IPs are to be fetched from NMagent.
873+
// AzureHost channelmode indicates Nodesubnet. IPs are to be fetched from NMagent.
874874
if config.ChannelMode == cns.AzureHost {
875875
if !cnsconfig.ManageEndpointState {
876876
logger.Errorf("ManageEndpointState must be set to true for AzureHost mode")
@@ -1506,6 +1506,7 @@ func InitializeCRDState(ctx context.Context, httpRestService cns.HTTPService, cn
15061506
return nil
15071507
}
15081508

1509+
// getPodInfoByIPProvider returns a PodInfoByIPProvider that reads endpoint state from the configured source
15091510
func getPodInfoByIPProvider(
15101511
ctx context.Context,
15111512
cnsconfig *configuration.CNSConfig,

0 commit comments

Comments
 (0)