@@ -218,6 +218,7 @@ type ADCServerOpts struct {
218218 LabelSelector map [string ]string `json:"labelSelector,omitempty"`
219219 IncludeResourceType []string `json:"includeResourceType,omitempty"`
220220 TlsSkipVerify * bool `json:"tlsSkipVerify,omitempty"`
221+ CacheKey string `json:"cacheKey"`
221222}
222223
223224// HTTPADCExecutor implements ADCExecutor interface using HTTP calls to ADC Server
@@ -247,7 +248,15 @@ func (e *HTTPADCExecutor) runHTTPSync(ctx context.Context, mode string, config a
247248 Name : config .Name ,
248249 }
249250
250- for _ , addr := range config .ServerAddrs {
251+ serverAddrs := func () []string {
252+ if mode == "apisix-standalone" {
253+ return []string {strings .Join (config .ServerAddrs , "," )}
254+ }
255+ return config .ServerAddrs
256+ }()
257+ log .Debugw ("running http sync" , zap .Strings ("serverAddrs" , serverAddrs ), zap .String ("mode" , mode ))
258+
259+ for _ , addr := range serverAddrs {
251260 if err := e .runHTTPSyncForSingleServer (ctx , addr , mode , config , args ); err != nil {
252261 log .Errorw ("failed to run http sync for server" , zap .String ("server" , addr ), zap .Error (err ))
253262 var execErr types.ADCExecutionServerAddrError
@@ -370,6 +379,7 @@ func (e *HTTPADCExecutor) buildHTTPRequest(ctx context.Context, serverAddr, mode
370379 LabelSelector : labels ,
371380 IncludeResourceType : types ,
372381 TlsSkipVerify : ptr .To (! tlsVerify ),
382+ CacheKey : config .Name ,
373383 },
374384 Config : * resources ,
375385 },
0 commit comments