@@ -70,14 +70,15 @@ type HTTPRestService struct {
70
70
state * httpRestServiceState
71
71
podsPendingIPAssignment * bounded.TimedSet
72
72
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
81
82
}
82
83
83
84
type CNIConflistGenerator interface {
@@ -169,6 +170,7 @@ type networkInfo struct {
169
170
func NewHTTPRestService (config * common.ServiceConfig , wscli interfaceGetter , wsproxy wireserverProxy , nmagentClient nmagentClient ,
170
171
endpointStateStore store.KeyValueStore , gen CNIConflistGenerator , homeAzMonitor * HomeAzMonitor ,
171
172
imdsClient imdsClient ,
173
+ overrideApipaGatewayAddress bool ,
172
174
) (* HTTPRestService , error ) {
173
175
service , err := cns .NewService (config .Name , config .Version , config .ChannelMode , config .Store )
174
176
if err != nil {
@@ -214,24 +216,25 @@ func NewHTTPRestService(config *common.ServiceConfig, wscli interfaceGetter, wsp
214
216
}
215
217
216
218
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 ,
235
238
}, nil
236
239
}
237
240
0 commit comments