Skip to content

Commit 11ecb35

Browse files
authored
fix: set default provider type (#2436)
Signed-off-by: ashing <[email protected]>
1 parent 16f9d60 commit 11ecb35

File tree

6 files changed

+5
-9
lines changed

6 files changed

+5
-9
lines changed

config/samples/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ exec_adc_timeout: 15s # The timeout for the ADC to execute.
3232
# The default value is 15 seconds.
3333

3434
provider:
35-
type: "apisix-standalone"
35+
type: "apisix"
3636

3737
sync_period: 0s
3838
# The period between two consecutive syncs.

internal/controller/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func NewDefaultConfig() *Config {
5151
LeaderElection: NewLeaderElection(),
5252
ExecADCTimeout: types.TimeDuration{Duration: 15 * time.Second},
5353
ProviderConfig: ProviderConfig{
54-
Type: ProviderTypeStandalone,
54+
Type: ProviderTypeAPISIX,
5555
SyncPeriod: types.TimeDuration{Duration: 0},
5656
InitSyncDelay: types.TimeDuration{Duration: 20 * time.Minute},
5757
},

test/e2e/framework/apisix_consts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
)
2828

2929
var (
30-
ProviderType = cmp.Or(os.Getenv("PROVIDER_TYPE"), "apisix-standalone")
30+
ProviderType = cmp.Or(os.Getenv("PROVIDER_TYPE"), "apisix")
3131
)
3232

3333
var (

test/e2e/framework/manifests/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ data:
328328
329329
leader_election_id: "apisix-ingress-controller-leader"
330330
provider:
331-
type: {{ .ProviderType | default "apisix-standalone" }}
331+
type: {{ .ProviderType | default "apisix" }}
332332
sync_period: {{ .ProviderSyncPeriod | default "0s" }}
333333
# The period between two consecutive syncs.
334334
# The default value is 0 seconds, which means the controller will not sync.

test/e2e/scaffold/adc.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131

3232
adctypes "github.com/apache/apisix-ingress-controller/api/adc"
3333
"github.com/apache/apisix-ingress-controller/internal/provider/adc/translator"
34-
"github.com/apache/apisix-ingress-controller/test/e2e/framework"
3534
)
3635

3736
// DataplaneResource defines the interface for accessing dataplane resources
@@ -136,9 +135,6 @@ func (a *adcDataplaneResource) dumpResources(ctx context.Context) (*translator.T
136135
"ADC_SERVER=" + a.serverAddr,
137136
"ADC_TOKEN=" + a.token,
138137
}
139-
if framework.ProviderType != "" {
140-
adcEnv = append(adcEnv, "ADC_BACKEND="+framework.ProviderType)
141-
}
142138

143139
var stdout, stderr bytes.Buffer
144140
cmd := exec.CommandContext(ctxWithTimeout, "adc", args...)

test/e2e/scaffold/apisix_deployer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ func (s *APISIXDeployer) GetAdminEndpoint(svc ...*corev1.Service) string {
384384

385385
func (s *APISIXDeployer) DefaultDataplaneResource() DataplaneResource {
386386
return newADCDataplaneResource(
387-
"apisix-standalone",
387+
framework.ProviderType,
388388
fmt.Sprintf("http://%s", s.adminTunnel.Endpoint()),
389389
s.AdminKey(),
390390
false, // tlsVerify

0 commit comments

Comments
 (0)