This is an automated email from the ASF dual-hosted git repository.

alinsran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 11ecb353 fix: set default provider type (#2436)
11ecb353 is described below

commit 11ecb353d074b7392046d08e52bc824a3eeb6ee7
Author: Ashing Zheng <axing...@gmail.com>
AuthorDate: Fri Jun 27 20:17:34 2025 +0800

    fix: set default provider type (#2436)
    
    Signed-off-by: ashing <axing...@gmail.com>
---
 config/samples/config.yaml                | 2 +-
 internal/controller/config/config.go      | 2 +-
 test/e2e/framework/apisix_consts.go       | 2 +-
 test/e2e/framework/manifests/ingress.yaml | 2 +-
 test/e2e/scaffold/adc.go                  | 4 ----
 test/e2e/scaffold/apisix_deployer.go      | 2 +-
 6 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/config/samples/config.yaml b/config/samples/config.yaml
index 6a137bde..3e59ccbf 100644
--- a/config/samples/config.yaml
+++ b/config/samples/config.yaml
@@ -32,7 +32,7 @@ exec_adc_timeout: 15s                   # The timeout for the 
ADC to execute.
                                         # The default value is 15 seconds.
 
 provider:
-  type: "apisix-standalone"
+  type: "apisix"
 
   sync_period: 0s
                                         # The period between two consecutive 
syncs.
diff --git a/internal/controller/config/config.go 
b/internal/controller/config/config.go
index 3eda4493..069c5757 100644
--- a/internal/controller/config/config.go
+++ b/internal/controller/config/config.go
@@ -51,7 +51,7 @@ func NewDefaultConfig() *Config {
                LeaderElection:   NewLeaderElection(),
                ExecADCTimeout:   types.TimeDuration{Duration: 15 * 
time.Second},
                ProviderConfig: ProviderConfig{
-                       Type:          ProviderTypeStandalone,
+                       Type:          ProviderTypeAPISIX,
                        SyncPeriod:    types.TimeDuration{Duration: 0},
                        InitSyncDelay: types.TimeDuration{Duration: 20 * 
time.Minute},
                },
diff --git a/test/e2e/framework/apisix_consts.go 
b/test/e2e/framework/apisix_consts.go
index 7c162fdf..42214982 100644
--- a/test/e2e/framework/apisix_consts.go
+++ b/test/e2e/framework/apisix_consts.go
@@ -27,7 +27,7 @@ import (
 )
 
 var (
-       ProviderType = cmp.Or(os.Getenv("PROVIDER_TYPE"), "apisix-standalone")
+       ProviderType = cmp.Or(os.Getenv("PROVIDER_TYPE"), "apisix")
 )
 
 var (
diff --git a/test/e2e/framework/manifests/ingress.yaml 
b/test/e2e/framework/manifests/ingress.yaml
index 52a8b222..1ed00c10 100644
--- a/test/e2e/framework/manifests/ingress.yaml
+++ b/test/e2e/framework/manifests/ingress.yaml
@@ -328,7 +328,7 @@ data:
 
     leader_election_id: "apisix-ingress-controller-leader"
     provider:
-      type: {{ .ProviderType | default "apisix-standalone" }}
+      type: {{ .ProviderType | default "apisix" }}
       sync_period: {{ .ProviderSyncPeriod | default "0s" }}
                                         # The period between two consecutive 
syncs.
                                         # The default value is 0 seconds, 
which means the controller will not sync.
diff --git a/test/e2e/scaffold/adc.go b/test/e2e/scaffold/adc.go
index a04344fb..ef075689 100644
--- a/test/e2e/scaffold/adc.go
+++ b/test/e2e/scaffold/adc.go
@@ -31,7 +31,6 @@ import (
 
        adctypes "github.com/apache/apisix-ingress-controller/api/adc"
        
"github.com/apache/apisix-ingress-controller/internal/provider/adc/translator"
-       "github.com/apache/apisix-ingress-controller/test/e2e/framework"
 )
 
 // DataplaneResource defines the interface for accessing dataplane resources
@@ -136,9 +135,6 @@ func (a *adcDataplaneResource) dumpResources(ctx 
context.Context) (*translator.T
                "ADC_SERVER=" + a.serverAddr,
                "ADC_TOKEN=" + a.token,
        }
-       if framework.ProviderType != "" {
-               adcEnv = append(adcEnv, "ADC_BACKEND="+framework.ProviderType)
-       }
 
        var stdout, stderr bytes.Buffer
        cmd := exec.CommandContext(ctxWithTimeout, "adc", args...)
diff --git a/test/e2e/scaffold/apisix_deployer.go 
b/test/e2e/scaffold/apisix_deployer.go
index a875e0b9..6d28b732 100644
--- a/test/e2e/scaffold/apisix_deployer.go
+++ b/test/e2e/scaffold/apisix_deployer.go
@@ -384,7 +384,7 @@ func (s *APISIXDeployer) GetAdminEndpoint(svc 
...*corev1.Service) string {
 
 func (s *APISIXDeployer) DefaultDataplaneResource() DataplaneResource {
        return newADCDataplaneResource(
-               "apisix-standalone",
+               framework.ProviderType,
                fmt.Sprintf("http://%s";, s.adminTunnel.Endpoint()),
                s.AdminKey(),
                false, // tlsVerify

Reply via email to