File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -61,21 +61,21 @@ func (dp *DataPlane) initializeDataPlane() error {
6161
6262 // Filter out any endpoints that are not in "AttachedShared" State. All running Windows pods with networking must be in this state.
6363 filterMap := map [string ]uint16 {"State" : hcnEndpointStateAttachedSharing }
64- filterMapL1VH := map [string ]uint16 {"State" : hcnEndpointStateAttached }
65-
6664 filter , err := json .Marshal (filterMap )
6765 if err != nil {
6866 return errors .Wrap (err , "failed to marshal endpoint filter map" )
6967 }
68+ dp .endpointQuery .query .Filter = string (filter )
7069
71- filterL1VH , errL1VH := json .Marshal (filterMapL1VH )
72- if errL1VH != nil {
73- return errors .Wrap (errL1VH , "failed to marshal endpoint filter map" )
70+ if dp .EnableNPMLite {
71+ filterMapL1VH := map [string ]uint16 {"State" : hcnEndpointStateAttached }
72+ filterL1VH , errL1VH := json .Marshal (filterMapL1VH )
73+ if errL1VH != nil {
74+ return errors .Wrap (errL1VH , "failed to marshal endpoint filter map" )
75+ }
76+ dp .endpointQueryL1VH .query .Filter = string (filterL1VH )
7477 }
7578
76- dp .endpointQuery .query .Filter = string (filter )
77- dp .endpointQueryL1VH .query .Filter = string (filterL1VH )
78-
7979 // reset endpoint cache so that netpol references are removed for all endpoints while refreshing pod endpoints
8080 // no need to lock endpointCache at boot up
8181 dp .endpointCache .cache = make (map [string ]* npmEndpoint )
You can’t perform that action at this time.
0 commit comments