@@ -70,14 +70,15 @@ type HTTPRestService struct {
7070 state * httpRestServiceState
7171 podsPendingIPAssignment * bounded.TimedSet
7272 sync.RWMutex
73- dncPartitionKey string
74- EndpointState map [string ]* EndpointInfo // key : container id
75- EndpointStateStore store.KeyValueStore
76- cniConflistGenerator CNIConflistGenerator
77- generateCNIConflistOnce sync.Once
78- IPConfigsHandlerMiddleware cns.IPConfigsHandlerMiddleware
79- PnpIDByMacAddress map [string ]string
80- imdsClient imdsClient
73+ dncPartitionKey string
74+ EndpointState map [string ]* EndpointInfo // key : container id
75+ EndpointStateStore store.KeyValueStore
76+ cniConflistGenerator CNIConflistGenerator
77+ generateCNIConflistOnce sync.Once
78+ IPConfigsHandlerMiddleware cns.IPConfigsHandlerMiddleware
79+ PnpIDByMacAddress map [string ]string
80+ imdsClient imdsClient
81+ overrideApipaGatewayAddress bool
8182}
8283
8384type CNIConflistGenerator interface {
@@ -169,6 +170,7 @@ type networkInfo struct {
169170func NewHTTPRestService (config * common.ServiceConfig , wscli interfaceGetter , wsproxy wireserverProxy , nmagentClient nmagentClient ,
170171 endpointStateStore store.KeyValueStore , gen CNIConflistGenerator , homeAzMonitor * HomeAzMonitor ,
171172 imdsClient imdsClient ,
173+ overrideApipaGatewayAddress bool ,
172174) (* HTTPRestService , error ) {
173175 service , err := cns .NewService (config .Name , config .Version , config .ChannelMode , config .Store )
174176 if err != nil {
@@ -214,24 +216,25 @@ func NewHTTPRestService(config *common.ServiceConfig, wscli interfaceGetter, wsp
214216 }
215217
216218 return & HTTPRestService {
217- Service : service ,
218- store : service .Service .Store ,
219- dockerClient : dc ,
220- wscli : wscli ,
221- ipamClient : ic ,
222- nma : nmagentClient ,
223- wsproxy : wsproxy ,
224- networkContainer : nc ,
225- PodIPIDByPodInterfaceKey : podIPIDByPodInterfaceKey ,
226- PodIPConfigState : podIPConfigState ,
227- routingTable : routingTable ,
228- state : serviceState ,
229- podsPendingIPAssignment : bounded .NewTimedSet (250 ), // nolint:gomnd // maxpods
230- EndpointStateStore : endpointStateStore ,
231- EndpointState : make (map [string ]* EndpointInfo ),
232- homeAzMonitor : homeAzMonitor ,
233- cniConflistGenerator : gen ,
234- imdsClient : imdsClient ,
219+ Service : service ,
220+ store : service .Service .Store ,
221+ dockerClient : dc ,
222+ wscli : wscli ,
223+ ipamClient : ic ,
224+ nma : nmagentClient ,
225+ wsproxy : wsproxy ,
226+ networkContainer : nc ,
227+ PodIPIDByPodInterfaceKey : podIPIDByPodInterfaceKey ,
228+ PodIPConfigState : podIPConfigState ,
229+ routingTable : routingTable ,
230+ state : serviceState ,
231+ podsPendingIPAssignment : bounded .NewTimedSet (250 ), // nolint:gomnd // maxpods
232+ EndpointStateStore : endpointStateStore ,
233+ EndpointState : make (map [string ]* EndpointInfo ),
234+ homeAzMonitor : homeAzMonitor ,
235+ cniConflistGenerator : gen ,
236+ imdsClient : imdsClient ,
237+ overrideApipaGatewayAddress : overrideApipaGatewayAddress ,
235238 }, nil
236239}
237240
0 commit comments