Skip to content

Commit b7561d3

Browse files
committed
fix: r
Signed-off-by: ashing <[email protected]>
1 parent c3fad64 commit b7561d3

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ADC_EXPERIMENTAL_FEATURE_FLAGS=remote-state-file,parallel-backend-request
2+
ADC_RUNNING_MODE=ingress
3+
ADC_BACKEND=api7ee
4+
ADC_SERVER=https://172.18.0.6:7443
5+
ADC_TOKEN=a7adm-CAo25d64cIhz2rZW40E1hBC9gn403lAb2TPJJ6F0zSQB9h04HN-71ebdde934d643fd92b7101da0669853

config/samples/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ controller_name: apisix.apache.org/api7-ingress-controller # The controller nam
77
leader_election_id: "api7-ingress-controller-leader" # The leader election ID for the API7 Ingress Controller.
88
# The default value is "api7-ingress-controller-leader".
99
leader_election:
10-
lease_duration: 15s # lease_duration is the duration that non-leader candidates will wait
10+
lease_duration: 30s # lease_duration is the duration that non-leader candidates will wait
1111
# after observing a leadership renewal until attempting to acquire leadership of a
1212
# leader election.
13-
renew_deadline: 10s # renew_deadline is the time in seconds that the acting controller
13+
renew_deadline: 20s # renew_deadline is the time in seconds that the acting controller
1414
# will retry refreshing leadership before giving up.
1515
retry_period: 2s # retry_period is the time in seconds that the acting controller
1616
# will wait between tries of actions with the controller.

internal/provider/adc/adc.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ type adcConfig struct {
3232
type adcClient struct {
3333
sync.Mutex
3434

35+
execLock sync.Mutex
36+
3537
translator *translator.Translator
3638
ServerAddr string
3739
Token string
@@ -230,6 +232,9 @@ func (d *adcClient) sync(ctx context.Context, task Task) error {
230232
}
231233

232234
func (d *adcClient) execADC(ctx context.Context, config adcConfig, args []string) error {
235+
d.execLock.Lock()
236+
defer d.execLock.Unlock()
237+
233238
ctxWithTimeout, cancel := context.WithTimeout(ctx, d.syncTimeout)
234239
defer cancel()
235240
// todo: use adc config

test/e2e/framework/dashboard.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ func (f *Framework) GetDataplaneCertificates(gatewayGroupID string) *v1.Dataplan
367367
POST("/api/gateway_groups/"+gatewayGroupID+"/dp_client_certificates").
368368
WithBasicAuth("admin", "admin").
369369
WithHeader("Content-Type", "application/json").
370+
WithBytes([]byte(`{}`)).
370371
Expect()
371372

372373
f.Logger.Logf(f.GinkgoT, "dataplane certificates issuer response: %s", respExp.Body().Raw())

0 commit comments

Comments
 (0)