You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/09/16 07:03:37 UTC
[apisix] branch master updated: change: move config_center under deployment and named as config_provider (#7901)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new a44084370 change: move config_center under deployment and named as config_provider (#7901)
a44084370 is described below
commit a440843701d21b1cde4134c1239faa866e1dbc1a
Author: tzssangglass <tz...@gmail.com>
AuthorDate: Fri Sep 16 15:03:27 2022 +0800
change: move config_center under deployment and named as config_provider (#7901)
---
apisix/cli/etcd.lua | 2 +-
apisix/cli/file.lua | 33 +++++++++-------
apisix/cli/ops.lua | 4 +-
apisix/cli/schema.lua | 5 +--
apisix/core.lua | 8 ++--
conf/config-default.yaml | 2 -
docs/en/latest/stand-alone.md | 8 ++--
docs/zh/latest/stand-alone.md | 8 ++--
t/APISIX.pm | 5 ++-
t/bin/gen_snippet.lua | 7 ++++
t/cli/test_admin.sh | 14 ++++---
t/cli/test_serverless.sh | 5 ++-
t/cli/test_standalone.sh | 5 ++-
t/config-center-yaml/consumer.t | 5 ++-
t/config-center-yaml/global-rule.t | 5 ++-
t/config-center-yaml/plugin-configs.t | 5 ++-
t/config-center-yaml/plugin-metadata.t | 5 ++-
t/config-center-yaml/plugin.t | 17 ++++++--
t/config-center-yaml/route-service.t | 5 ++-
t/config-center-yaml/route-upstream.t | 5 ++-
t/config-center-yaml/route.t | 29 ++++++++++----
t/config-center-yaml/ssl.t | 5 ++-
t/config-center-yaml/stream-route.t | 5 ++-
t/control/discovery.t | 11 ++++--
t/control/healthcheck.t | 5 ++-
t/control/routes.t | 5 ++-
t/control/services.t | 5 ++-
t/control/upstreams.t | 5 ++-
t/discovery/consul_kv.t | 30 +++++++++-----
t/discovery/consul_kv_dump.t | 48 +++++++++++++++--------
t/discovery/dns/mix.t | 5 ++-
t/discovery/dns/sanity.t | 15 +++++--
t/discovery/eureka.t | 9 +++--
t/discovery/nacos.t | 10 ++++-
t/discovery/nacos2.t | 5 ++-
t/kubernetes/discovery/kubernetes.t | 29 +++++++++-----
t/kubernetes/discovery/kubernetes2.t | 54 +++++++++++++++++---------
t/kubernetes/discovery/kubernetes3.t | 54 +++++++++++++++++---------
t/node/grpc-proxy.t | 5 ++-
t/node/healthcheck-discovery.t | 5 ++-
t/node/healthcheck2.t | 5 ++-
t/node/least_conn.t | 5 ++-
t/node/priority-balancer/health-checker.t | 5 ++-
t/node/priority-balancer/sanity.t | 5 ++-
t/node/upstream-discovery.t | 5 ++-
t/node/upstream-domain-with-special-dns.t | 15 +++++--
t/node/upstream-domain-with-special-ipv6-dns.t | 5 ++-
t/perf/test_http.py | 8 +++-
t/plugin/dubbo-proxy/route.t | 5 ++-
t/plugin/dubbo-proxy/upstream.t | 5 ++-
t/plugin/http-logger-json.t | 5 ++-
t/plugin/prometheus.t | 5 ++-
t/plugin/proxy-rewrite2.t | 5 ++-
t/router/radixtree-host-uri-priority.t | 14 ++++---
t/router/radixtree-host-uri2.t | 16 +++++---
t/stream-node/priority-balancer.t | 5 ++-
t/tars/discovery/tars.t | 5 ++-
t/xds-library/config_xds.t | 6 ++-
t/xds-library/config_xds_2.t | 6 ++-
59 files changed, 439 insertions(+), 183 deletions(-)
diff --git a/apisix/cli/etcd.lua b/apisix/cli/etcd.lua
index adf5c26cd..14c6a4467 100644
--- a/apisix/cli/etcd.lua
+++ b/apisix/cli/etcd.lua
@@ -157,7 +157,7 @@ function _M.init(env, args)
util.die("failed to read `apisix` field from yaml file when init etcd")
end
- if yaml_conf.apisix.config_center ~= "etcd" then
+ if yaml_conf.deployment.config_provider ~= "etcd" then
return true
end
diff --git a/apisix/cli/file.lua b/apisix/cli/file.lua
index dae9504dc..3f33e33a1 100644
--- a/apisix/cli/file.lua
+++ b/apisix/cli/file.lua
@@ -233,21 +233,8 @@ function _M.read_yaml_conf(apisix_home)
end
end
- if default_conf.apisix.config_center == "yaml" then
- local apisix_conf_path = profile:yaml_path("apisix")
- local apisix_conf_yaml, _ = util.read_file(apisix_conf_path)
- if apisix_conf_yaml then
- local apisix_conf = yaml.parse(apisix_conf_yaml)
- if apisix_conf then
- local ok, err = resolve_conf_var(apisix_conf)
- if not ok then
- return nil, err
- end
- end
- end
- end
-
if default_conf.deployment then
+ default_conf.deployment.config_provider = "etcd"
if default_conf.deployment.role == "traditional" then
default_conf.etcd = default_conf.deployment.etcd
@@ -257,7 +244,9 @@ function _M.read_yaml_conf(apisix_home)
elseif default_conf.deployment.role == "data_plane" then
if default_conf.deployment.role_data_plane.config_provider == "yaml" then
- default_conf.apisix.config_center = "yaml"
+ default_conf.deployment.config_provider = "yaml"
+ elseif default_conf.deployment.role_data_plane.config_provider == "xds" then
+ default_conf.deployment.config_provider = "xds"
else
default_conf.etcd = default_conf.deployment.role_data_plane.control_plane
end
@@ -276,6 +265,20 @@ function _M.read_yaml_conf(apisix_home)
end
end
+ if default_conf.deployment.config_provider == "yaml" then
+ local apisix_conf_path = profile:yaml_path("apisix")
+ local apisix_conf_yaml, _ = util.read_file(apisix_conf_path)
+ if apisix_conf_yaml then
+ local apisix_conf = yaml.parse(apisix_conf_yaml)
+ if apisix_conf then
+ local ok, err = resolve_conf_var(apisix_conf)
+ if not ok then
+ return nil, err
+ end
+ end
+ end
+ end
+
return default_conf
end
diff --git a/apisix/cli/ops.lua b/apisix/cli/ops.lua
index d00ce072d..c8cf6ab44 100644
--- a/apisix/cli/ops.lua
+++ b/apisix/cli/ops.lua
@@ -244,9 +244,9 @@ Please modify "admin_key" in conf/config.yaml .
end
if yaml_conf.apisix.enable_admin and
- yaml_conf.apisix.config_center == "yaml"
+ yaml_conf.deployment.config_provider == "yaml"
then
- util.die("ERROR: Admin API can only be used with etcd config_center.\n")
+ util.die("ERROR: Admin API can only be used with etcd config_provider.\n")
end
local or_ver = get_openresty_version()
diff --git a/apisix/cli/schema.lua b/apisix/cli/schema.lua
index 1a501ca32..bb786f491 100644
--- a/apisix/cli/schema.lua
+++ b/apisix/cli/schema.lua
@@ -71,9 +71,6 @@ local config_schema = {
properties = {
apisix = {
properties = {
- config_center = {
- enum = {"etcd", "yaml", "xds"},
- },
lua_module_hook = {
pattern = "^[a-zA-Z._-]+$",
},
@@ -380,7 +377,7 @@ local deployment_schema = {
role_data_plane = {
properties = {
config_provider = {
- enum = {"control_plane", "yaml"}
+ enum = {"control_plane", "yaml", "xds"}
},
},
required = {"config_provider"}
diff --git a/apisix/core.lua b/apisix/core.lua
index 0e0919bb8..f421716e6 100644
--- a/apisix/core.lua
+++ b/apisix/core.lua
@@ -21,11 +21,11 @@ if not local_conf then
error("failed to parse yaml config: " .. err)
end
-local config_center = local_conf.apisix and local_conf.apisix.config_center
+local config_provider = local_conf.deployment and local_conf.deployment.config_provider
or "etcd"
-log.info("use config_center: ", config_center)
-local config = require("apisix.core.config_" .. config_center)
-config.type = config_center
+log.info("use config_provider: ", config_provider)
+local config = require("apisix.core.config_" .. config_provider)
+config.type = config_provider
return {
diff --git a/conf/config-default.yaml b/conf/config-default.yaml
index 287613a57..9c70d8ee0 100755
--- a/conf/config-default.yaml
+++ b/conf/config-default.yaml
@@ -33,8 +33,6 @@ apisix:
enable_reuseport: true # Enable nginx SO_REUSEPORT switch if set to true.
show_upstream_status_in_response_header: false # when true all upstream status write to `X-APISIX-Upstream-Status` otherwise only 5xx code
enable_ipv6: true
- config_center: etcd # etcd: use etcd to store the config value
- # yaml: fetch the config value from local yaml file `/your_path/conf/apisix.yaml`
#proxy_protocol: # Proxy Protocol configuration
#listen_http_port: 9181 # The port with proxy protocol for http, it differs from node_listen and admin_listen.
diff --git a/docs/en/latest/stand-alone.md b/docs/en/latest/stand-alone.md
index dac3b1a29..c08ce9632 100644
--- a/docs/en/latest/stand-alone.md
+++ b/docs/en/latest/stand-alone.md
@@ -34,13 +34,15 @@ The routing rules in the `conf/apisix.yaml` file are loaded into memory immediat
Since the current Admin API is based on the etcd configuration center solution, enable Admin API is not allowed when the Stand-alone mode is enabled.
-To enable Stand-alone mode, we can set `apisix.config_center` to `yaml` and disable Admin API in file `conf/config.yaml`.
+The Stand-alone mode can only be enabled when set the role of APISIX as data plane. We can set `deployment.role` to `data_plane` and `deployment.role_data_plane.config_provider` to `yaml`.
Refer to the example below:
```yaml
-apisix:
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
```
### How to configure rules
diff --git a/docs/zh/latest/stand-alone.md b/docs/zh/latest/stand-alone.md
index b10f2fe38..9abbe20d6 100644
--- a/docs/zh/latest/stand-alone.md
+++ b/docs/zh/latest/stand-alone.md
@@ -35,13 +35,15 @@ APISIX 节点服务启动后会立刻加载 `conf/apisix.yaml` 文件中的路
由于目前 Admin API 都是基于 etcd 配置中心解决方案,当开启 Stand-alone 模式后,
Admin API 将不再被允许使用。
-通过设置 `conf/config.yaml` 中的 `apisix.config_center` 选项为 `yaml` ,并禁用 Admin API 即可启用 Stand-alone 模式。
+只有当 APISIX 的角色设置为 data plane 时,才能开启 Stand-alone 模式。通过设置 `deployment.role` 为 `data_plane`,设置 `deployment.role_data_plane.config_provider` 为 `yaml` 即可启用 Stand-alone 模式。
参考下面示例:
```yaml
-apisix:
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
```
### 如何配置规则
diff --git a/t/APISIX.pm b/t/APISIX.pm
index b6e90b45d..e95ad46cd 100644
--- a/t/APISIX.pm
+++ b/t/APISIX.pm
@@ -232,8 +232,11 @@ add_block_preprocessor(sub {
$user_yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
}
diff --git a/t/bin/gen_snippet.lua b/t/bin/gen_snippet.lua
index 085409b6b..9ef21c328 100755
--- a/t/bin/gen_snippet.lua
+++ b/t/bin/gen_snippet.lua
@@ -33,6 +33,13 @@ local yaml_conf, err = file.read_yaml_conf("t/servroot")
if not yaml_conf then
error(err)
end
+
+if yaml_conf.deployment.role == "data_plane" and
+ yaml_conf.deployment.config_provider == "yaml"
+ or yaml_conf.deployment.config_provider == "xds" then
+ return
+end
+
local ok, err = schema.validate(yaml_conf)
if not ok then
error(err)
diff --git a/t/cli/test_admin.sh b/t/cli/test_admin.sh
index bbca12270..f71f7fca2 100755
--- a/t/cli/test_admin.sh
+++ b/t/cli/test_admin.sh
@@ -204,20 +204,24 @@ fi
echo "pass: uninitialized variable not found during writing access log (admin_listen set)"
-# Admin API can only be used with etcd config_center
+# Admin API can only be used with etcd config_provider
+## if role is data_plane, and config_provider is yaml, then enable_admin is set to false
echo '
apisix:
enable_admin: true
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
' > conf/config.yaml
out=$(make init 2>&1 || true)
-if ! echo "$out" | grep "Admin API can only be used with etcd config_center"; then
- echo "failed: Admin API can only be used with etcd config_center"
+if echo "$out" | grep "Admin API can only be used with etcd config_provider"; then
+ echo "failed: Admin API can only be used with etcd config_provider"
exit 1
fi
-echo "passed: Admin API can only be used with etcd config_center"
+echo "passed: Admin API can only be used with etcd config_provider"
# disable Admin API and init plugins syncer
echo '
diff --git a/t/cli/test_serverless.sh b/t/cli/test_serverless.sh
index 8c1132c5b..8f1d7e103 100755
--- a/t/cli/test_serverless.sh
+++ b/t/cli/test_serverless.sh
@@ -31,7 +31,10 @@ rm logs/error.log || echo ''
echo '
apisix:
enable_admin: false
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
' > conf/config.yaml
make init
diff --git a/t/cli/test_standalone.sh b/t/cli/test_standalone.sh
index 1a66c5bf8..2a3add666 100755
--- a/t/cli/test_standalone.sh
+++ b/t/cli/test_standalone.sh
@@ -30,7 +30,10 @@ trap standalone EXIT
echo '
apisix:
enable_admin: false
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
' > conf/config.yaml
echo '
diff --git a/t/config-center-yaml/consumer.t b/t/config-center-yaml/consumer.t
index 123aa4229..cb503219f 100644
--- a/t/config-center-yaml/consumer.t
+++ b/t/config-center-yaml/consumer.t
@@ -27,7 +27,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/config-center-yaml/global-rule.t b/t/config-center-yaml/global-rule.t
index d310c0c1b..5fe5d0fe5 100644
--- a/t/config-center-yaml/global-rule.t
+++ b/t/config-center-yaml/global-rule.t
@@ -27,7 +27,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/config-center-yaml/plugin-configs.t b/t/config-center-yaml/plugin-configs.t
index 2caec45dc..468216dbf 100644
--- a/t/config-center-yaml/plugin-configs.t
+++ b/t/config-center-yaml/plugin-configs.t
@@ -27,7 +27,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/config-center-yaml/plugin-metadata.t b/t/config-center-yaml/plugin-metadata.t
index 3a1c37218..87f6ec1ca 100644
--- a/t/config-center-yaml/plugin-metadata.t
+++ b/t/config-center-yaml/plugin-metadata.t
@@ -27,7 +27,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/config-center-yaml/plugin.t b/t/config-center-yaml/plugin.t
index e3d13b97d..b6a7e4ef3 100644
--- a/t/config-center-yaml/plugin.t
+++ b/t/config-center-yaml/plugin.t
@@ -27,8 +27,11 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
@@ -84,7 +87,7 @@ GET /t
--- response_body
hello world
--- error_log
-use config_center: yaml
+use config_provider: yaml
load(): loaded plugin and sort by priority: 3000 name: ip-restriction
load(): loaded plugin and sort by priority: 2510 name: jwt-auth
load_stream(): loaded stream plugin and sort by priority: 1000 name: mqtt-proxy
@@ -102,8 +105,11 @@ load(): new plugins
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
plugins:
- ip-restriction
- jwt-auth
@@ -169,8 +175,11 @@ GET /apisix/prometheus/metrics
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
plugins:
- ip-restriction
- jwt-auth
diff --git a/t/config-center-yaml/route-service.t b/t/config-center-yaml/route-service.t
index ecb479f0a..b2d8e2ff6 100644
--- a/t/config-center-yaml/route-service.t
+++ b/t/config-center-yaml/route-service.t
@@ -24,7 +24,10 @@ no_shuffle();
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
run_tests();
diff --git a/t/config-center-yaml/route-upstream.t b/t/config-center-yaml/route-upstream.t
index 18fa800e9..71b9a0311 100644
--- a/t/config-center-yaml/route-upstream.t
+++ b/t/config-center-yaml/route-upstream.t
@@ -24,7 +24,10 @@ no_shuffle();
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
run_tests();
diff --git a/t/config-center-yaml/route.t b/t/config-center-yaml/route.t
index 6676adf6c..6214da0cc 100644
--- a/t/config-center-yaml/route.t
+++ b/t/config-center-yaml/route.t
@@ -24,7 +24,10 @@ no_shuffle();
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
run_tests();
@@ -48,7 +51,7 @@ GET /hello
--- response_body
hello world
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -71,7 +74,7 @@ routes:
GET /hello
--- error_code: 404
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -152,9 +155,12 @@ hello world
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
router:
http: "radixtree_host_uri"
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
--- apisix_yaml
routes:
-
@@ -180,9 +186,12 @@ property "uri" validation failed
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
router:
http: "radixtree_host_uri"
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
--- apisix_yaml
routes:
-
@@ -207,9 +216,12 @@ GET /hello
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
router:
http: "radixtree_host_uri"
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
--- apisix_yaml
routes:
-
@@ -234,7 +246,10 @@ GET /hello
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
--- apisix_yaml
routes:
-
diff --git a/t/config-center-yaml/ssl.t b/t/config-center-yaml/ssl.t
index e6c80627e..401ba4ec0 100644
--- a/t/config-center-yaml/ssl.t
+++ b/t/config-center-yaml/ssl.t
@@ -27,7 +27,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/config-center-yaml/stream-route.t b/t/config-center-yaml/stream-route.t
index 258924d18..6792b1bb9 100644
--- a/t/config-center-yaml/stream-route.t
+++ b/t/config-center-yaml/stream-route.t
@@ -27,7 +27,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/control/discovery.t b/t/control/discovery.t
index c1b00ee64..88c5c3493 100644
--- a/t/control/discovery.t
+++ b/t/control/discovery.t
@@ -27,8 +27,10 @@ our $yaml_config = <<_EOC_;
apisix:
enable_control: true
node_listen: 1984
- config_center: yaml
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
eureka:
host:
@@ -130,7 +132,10 @@ GET /v1/discovery/dns/dump
apisix:
enable_control: true
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
diff --git a/t/control/healthcheck.t b/t/control/healthcheck.t
index c7453df8c..d9ef02c24 100644
--- a/t/control/healthcheck.t
+++ b/t/control/healthcheck.t
@@ -29,7 +29,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/control/routes.t b/t/control/routes.t
index 41c773b9f..a24bc2c15 100644
--- a/t/control/routes.t
+++ b/t/control/routes.t
@@ -29,7 +29,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/control/services.t b/t/control/services.t
index e48ccf4b8..0003bcc9d 100644
--- a/t/control/services.t
+++ b/t/control/services.t
@@ -29,7 +29,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/control/upstreams.t b/t/control/upstreams.t
index 3fcce779b..09e9104ad 100644
--- a/t/control/upstreams.t
+++ b/t/control/upstreams.t
@@ -29,7 +29,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/discovery/consul_kv.t b/t/discovery/consul_kv.t
index 124dad109..011776eaf 100644
--- a/t/discovery/consul_kv.t
+++ b/t/discovery/consul_kv.t
@@ -81,8 +81,10 @@ _EOC_
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -193,8 +195,10 @@ routes:
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -248,8 +252,10 @@ skip some keys, return default nodes, get response: missing consul_kv services
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -457,8 +463,10 @@ location /v1/kv {
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -512,8 +520,10 @@ location /sleep {
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
diff --git a/t/discovery/consul_kv_dump.t b/t/discovery/consul_kv_dump.t
index 47e567c7e..3b9ad68be 100644
--- a/t/discovery/consul_kv_dump.t
+++ b/t/discovery/consul_kv_dump.t
@@ -45,9 +45,11 @@ _EOC_
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_control: true
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -108,9 +110,11 @@ GET /t
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_control: true
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -156,9 +160,11 @@ Configure the invalid consul server addr, and loading the last test 3 generated
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_control: true
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -203,9 +209,11 @@ success
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_control: true
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -262,9 +270,11 @@ test load unexpired /tmp/consul_kv.dump file generated by upper test when initia
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_control: true
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -296,9 +306,11 @@ test load expired ( by check: (dump_file.last_update + dump.expire) < ngx.time )
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_control: true
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -345,9 +357,11 @@ success
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_control: true
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
@@ -365,9 +379,11 @@ GET /v1/discovery/consul_kv/show_dump_file
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_control: true
-
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
consul_kv:
servers:
diff --git a/t/discovery/dns/mix.t b/t/discovery/dns/mix.t
index 5308f4b47..d9c2a5035 100644
--- a/t/discovery/dns/mix.t
+++ b/t/discovery/dns/mix.t
@@ -31,8 +31,11 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery: # service discovery center
dns:
servers:
diff --git a/t/discovery/dns/sanity.t b/t/discovery/dns/sanity.t
index b44ad1edc..8c1890bef 100644
--- a/t/discovery/dns/sanity.t
+++ b/t/discovery/dns/sanity.t
@@ -27,8 +27,11 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery: # service discovery center
dns:
servers:
@@ -70,8 +73,11 @@ __DATA__
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery: # service discovery center
dns:
servers:
@@ -147,9 +153,12 @@ failed to query the DNS server
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
enable_resolv_search_option: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery: # service discovery center
dns:
servers:
diff --git a/t/discovery/eureka.t b/t/discovery/eureka.t
index 4b9f73ea8..8ee9b1b76 100644
--- a/t/discovery/eureka.t
+++ b/t/discovery/eureka.t
@@ -24,7 +24,10 @@ no_shuffle();
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
eureka:
host:
@@ -59,7 +62,7 @@ GET /eureka/apps/APISIX-EUREKA
--- response_body_like
.*<name>APISIX-EUREKA</name>.*
--- error_log
-use config_center: yaml
+use config_provider: yaml
default_weight:80.
fetch_interval:10.
eureka uri:http://127.0.0.1:8761/eureka/.
@@ -109,7 +112,7 @@ GET /eureka-test/eureka/apps/APISIX-EUREKA
--- response_body_like
.*<name>APISIX-EUREKA</name>.*
--- error_log
-use config_center: yaml
+use config_provider: yaml
default_weight:80.
fetch_interval:10.
eureka uri:http://127.0.0.1:8761/eureka/.
diff --git a/t/discovery/nacos.t b/t/discovery/nacos.t
index c29b73383..9acd3b5a2 100644
--- a/t/discovery/nacos.t
+++ b/t/discovery/nacos.t
@@ -25,7 +25,10 @@ workers(4);
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
nacos:
host:
@@ -43,7 +46,10 @@ _EOC_
our $yaml_auth_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
nacos:
host:
diff --git a/t/discovery/nacos2.t b/t/discovery/nacos2.t
index ebc8b6efd..bb17fb687 100644
--- a/t/discovery/nacos2.t
+++ b/t/discovery/nacos2.t
@@ -38,7 +38,10 @@ __DATA__
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
nacos:
host:
diff --git a/t/kubernetes/discovery/kubernetes.t b/t/kubernetes/discovery/kubernetes.t
index a631cc98a..5f1171b72 100644
--- a/t/kubernetes/discovery/kubernetes.t
+++ b/t/kubernetes/discovery/kubernetes.t
@@ -97,7 +97,10 @@ __DATA__
apisix:
node_listen: 1984
config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes: {}
--- request
@@ -125,8 +128,10 @@ true
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
service: {}
@@ -156,8 +161,10 @@ true
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
service:
@@ -188,8 +195,10 @@ true
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
service:
@@ -222,8 +231,10 @@ true
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: "debug"
diff --git a/t/kubernetes/discovery/kubernetes2.t b/t/kubernetes/discovery/kubernetes2.t
index 8a71cd8cd..611223ca1 100644
--- a/t/kubernetes/discovery/kubernetes2.t
+++ b/t/kubernetes/discovery/kubernetes2.t
@@ -22,8 +22,10 @@ BEGIN {
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -354,8 +356,10 @@ qr{ 2 2 2 2 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -389,8 +393,10 @@ qr{ 2 2 2 2 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -425,8 +431,10 @@ qr{ 2 2 0 0 0 0 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -461,8 +469,10 @@ qr{ 0 0 2 2 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -497,8 +507,10 @@ qr{ 2 2 2 2 0 0 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -533,8 +545,10 @@ qr{ 2 2 2 2 0 0 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -569,8 +583,10 @@ qr{ 0 0 2 2 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -605,8 +621,10 @@ qr{ 0 0 0 0 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
diff --git a/t/kubernetes/discovery/kubernetes3.t b/t/kubernetes/discovery/kubernetes3.t
index 8a71cd8cd..611223ca1 100644
--- a/t/kubernetes/discovery/kubernetes3.t
+++ b/t/kubernetes/discovery/kubernetes3.t
@@ -22,8 +22,10 @@ BEGIN {
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -354,8 +356,10 @@ qr{ 2 2 2 2 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -389,8 +393,10 @@ qr{ 2 2 2 2 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -425,8 +431,10 @@ qr{ 2 2 0 0 0 0 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -461,8 +469,10 @@ qr{ 0 0 2 2 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -497,8 +507,10 @@ qr{ 2 2 2 2 0 0 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -533,8 +545,10 @@ qr{ 2 2 2 2 0 0 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -569,8 +583,10 @@ qr{ 0 0 2 2 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
@@ -605,8 +621,10 @@ qr{ 0 0 0 0 2 2 2 2 2 2 2 2 }
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
kubernetes:
- id: first
diff --git a/t/node/grpc-proxy.t b/t/node/grpc-proxy.t
index 95d1eb385..ed6eb2799 100644
--- a/t/node/grpc-proxy.t
+++ b/t/node/grpc-proxy.t
@@ -31,7 +31,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/node/healthcheck-discovery.t b/t/node/healthcheck-discovery.t
index cea0a3e5f..d5bf6bf5a 100644
--- a/t/node/healthcheck-discovery.t
+++ b/t/node/healthcheck-discovery.t
@@ -28,7 +28,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/node/healthcheck2.t b/t/node/healthcheck2.t
index 269e24d58..e52cf13a0 100644
--- a/t/node/healthcheck2.t
+++ b/t/node/healthcheck2.t
@@ -30,7 +30,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/node/least_conn.t b/t/node/least_conn.t
index 39570fd9a..4a33cab93 100644
--- a/t/node/least_conn.t
+++ b/t/node/least_conn.t
@@ -29,7 +29,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/node/priority-balancer/health-checker.t b/t/node/priority-balancer/health-checker.t
index 445210bd6..5e03f0e66 100644
--- a/t/node/priority-balancer/health-checker.t
+++ b/t/node/priority-balancer/health-checker.t
@@ -30,8 +30,11 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/node/priority-balancer/sanity.t b/t/node/priority-balancer/sanity.t
index 2c4b1f657..0ef66bf1d 100644
--- a/t/node/priority-balancer/sanity.t
+++ b/t/node/priority-balancer/sanity.t
@@ -30,8 +30,11 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/node/upstream-discovery.t b/t/node/upstream-discovery.t
index 4d4b03e11..9b6ceb28b 100644
--- a/t/node/upstream-discovery.t
+++ b/t/node/upstream-discovery.t
@@ -28,7 +28,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/node/upstream-domain-with-special-dns.t b/t/node/upstream-domain-with-special-dns.t
index e50e1d97e..9781e2b38 100644
--- a/t/node/upstream-domain-with-special-dns.t
+++ b/t/node/upstream-domain-with-special-dns.t
@@ -31,7 +31,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
@@ -111,8 +114,11 @@ connect to 127.0.0.1:1053
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
dns_resolver_valid: 900
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
--- apisix_yaml
upstreams:
-
@@ -191,8 +197,11 @@ connect to 127.0.0.1:1053
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
dns_resolver_valid: 1
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
--- apisix_yaml
upstreams:
-
diff --git a/t/node/upstream-domain-with-special-ipv6-dns.t b/t/node/upstream-domain-with-special-ipv6-dns.t
index a1efc0e27..61d2ca1f1 100644
--- a/t/node/upstream-domain-with-special-ipv6-dns.t
+++ b/t/node/upstream-domain-with-special-ipv6-dns.t
@@ -31,7 +31,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/perf/test_http.py b/t/perf/test_http.py
index 135f24d06..36bb236b4 100755
--- a/t/perf/test_http.py
+++ b/t/perf/test_http.py
@@ -37,9 +37,15 @@ def create_conf():
with open("./conf/config-perf.yaml", "w") as f:
conf = {
"apisix": {
- "config_center": "yaml",
"enable_admin": False,
},
+ "deployment": {
+ "role": "data_plane",
+ "role_data_plane": {
+ "config_provider": "yaml",
+ }
+
+ },
"nginx_config": {
"worker_processes": 2
}
diff --git a/t/plugin/dubbo-proxy/route.t b/t/plugin/dubbo-proxy/route.t
index 46cf9e834..5824125b2 100644
--- a/t/plugin/dubbo-proxy/route.t
+++ b/t/plugin/dubbo-proxy/route.t
@@ -48,8 +48,11 @@ _EOC_
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/plugin/dubbo-proxy/upstream.t b/t/plugin/dubbo-proxy/upstream.t
index f831b211f..71f6dc48d 100644
--- a/t/plugin/dubbo-proxy/upstream.t
+++ b/t/plugin/dubbo-proxy/upstream.t
@@ -50,8 +50,11 @@ _EOC_
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/plugin/http-logger-json.t b/t/plugin/http-logger-json.t
index 0d2839d23..46b79797b 100644
--- a/t/plugin/http-logger-json.t
+++ b/t/plugin/http-logger-json.t
@@ -27,7 +27,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/plugin/prometheus.t b/t/plugin/prometheus.t
index 91756d6e1..3d8b8299f 100644
--- a/t/plugin/prometheus.t
+++ b/t/plugin/prometheus.t
@@ -611,7 +611,10 @@ qr/apisix_node_info\{hostname=".*"\} 1/
--- yaml_config
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
--- apisix_yaml
routes:
-
diff --git a/t/plugin/proxy-rewrite2.t b/t/plugin/proxy-rewrite2.t
index 89763a293..4ba236f36 100644
--- a/t/plugin/proxy-rewrite2.t
+++ b/t/plugin/proxy-rewrite2.t
@@ -27,7 +27,10 @@ add_block_preprocessor(sub {
my $yaml_config = $block->yaml_config // <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/router/radixtree-host-uri-priority.t b/t/router/radixtree-host-uri-priority.t
index b7826f46c..3fd214668 100644
--- a/t/router/radixtree-host-uri-priority.t
+++ b/t/router/radixtree-host-uri-priority.t
@@ -25,9 +25,13 @@ no_shuffle();
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
router:
http: 'radixtree_host_uri'
+ admin_key: null
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
run_tests();
@@ -63,7 +67,7 @@ Host: test.com
--- response_body eval
qr/1980/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -98,7 +102,7 @@ Host: test.com
--- response_body eval
qr/1981/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -132,7 +136,7 @@ Host: test.com
--- response_body eval
qr/1980/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -166,6 +170,6 @@ Host: test.com
--- response_body eval
qr/1981/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
diff --git a/t/router/radixtree-host-uri2.t b/t/router/radixtree-host-uri2.t
index 6699b87a7..4d6007216 100644
--- a/t/router/radixtree-host-uri2.t
+++ b/t/router/radixtree-host-uri2.t
@@ -25,9 +25,13 @@ no_shuffle();
our $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
router:
http: 'radixtree_host_uri'
+ admin_key: null
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
run_tests();
@@ -60,7 +64,7 @@ Host: test.com
--- response_body eval
qr/1981/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -92,7 +96,7 @@ Host: www.test.com
--- response_body eval
qr/1981/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -124,7 +128,7 @@ Host: www.test.com
--- response_body eval
qr/1981/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -157,7 +161,7 @@ Host: www.test.com
--- response_body eval
qr/1980/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
@@ -190,7 +194,7 @@ Host: www.test.com
--- response_body eval
qr/1981/
--- error_log
-use config_center: yaml
+use config_provider: yaml
--- no_error_log
[error]
diff --git a/t/stream-node/priority-balancer.t b/t/stream-node/priority-balancer.t
index 5448718d8..00fc91cbb 100644
--- a/t/stream-node/priority-balancer.t
+++ b/t/stream-node/priority-balancer.t
@@ -30,7 +30,10 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/tars/discovery/tars.t b/t/tars/discovery/tars.t
index da85fb3f5..a64f4096b 100644
--- a/t/tars/discovery/tars.t
+++ b/t/tars/discovery/tars.t
@@ -28,8 +28,11 @@ add_block_preprocessor(sub {
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: yaml
enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: yaml
discovery:
tars:
db_conf:
diff --git a/t/xds-library/config_xds.t b/t/xds-library/config_xds.t
index 8df413aa3..b82b7d9c5 100644
--- a/t/xds-library/config_xds.t
+++ b/t/xds-library/config_xds.t
@@ -64,8 +64,10 @@ _EOC_
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: xds
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: xds
_EOC_
$block->set_value("yaml_config", $yaml_config);
diff --git a/t/xds-library/config_xds_2.t b/t/xds-library/config_xds_2.t
index 67629d4bc..bfd9fd0d5 100644
--- a/t/xds-library/config_xds_2.t
+++ b/t/xds-library/config_xds_2.t
@@ -46,8 +46,10 @@ _EOC_
my $yaml_config = <<_EOC_;
apisix:
node_listen: 1984
- config_center: xds
- enable_admin: false
+deployment:
+ role: data_plane
+ role_data_plane:
+ config_provider: xds
_EOC_
$block->set_value("yaml_config", $yaml_config);