Skip to content

Commit 5433dce

Browse files
authored
docs: update docs for the removal of config-default.yaml (3.10.0) (#11504)
1 parent 45aa747 commit 5433dce

18 files changed

+157
-91
lines changed

docs/en/latest/FAQ.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -756,15 +756,15 @@ deployment:
756756
password: etcd_password # password for etcd
757757
```
758758

759-
For other ETCD configurations, such as expiration times, retries, and so on, you can refer to the `ETCD` section in the `conf/config-default.yaml` file.
759+
For other ETCD configurations, such as expiration times, retries, and so on, you can refer to the `etcd` section in the sample configuration `conf/config.yaml.example` file.
760760

761-
## What is the difference between SSLs and tls.client_cert in upstream configurations, and ssl_trusted_certificate in config-default.yaml?
761+
## What is the difference between SSLs, `tls.client_cert` in upstream configurations, and `ssl_trusted_certificate` in `config.yaml`?
762762

763763
The `ssls` is managed through the `/apisix/admin/ssls` API. It's used for managing TLS certificates. These certificates may be used during TLS handshake (between Apache APISIX and its clients). Apache APISIX uses Server Name Indication (SNI) to differentiate between certificates of different domains.
764764

765765
The `tls.client_cert`, `tls.client_key`, and `tls.client_cert_id` in upstream are used for mTLS communication with the upstream.
766766

767-
The `ssl_trusted_certificate` in config-default.yaml configures a trusted CA certificate. It is used for verifying some certificates signed by private authorities within APISIX, to avoid APISIX rejects the certificate. Note that it is not used to trust the certificates of APISIX upstream, because APISIX does not verify the legality of the upstream certificates. Therefore, even if the upstream uses an invalid TLS certificate, it can still be accessed without configuring a root certificate.
767+
The `ssl_trusted_certificate` in `config.yaml` configures a trusted CA certificate. It is used for verifying some certificates signed by private authorities within APISIX, to avoid APISIX rejects the certificate. Note that it is not used to trust the certificates of APISIX upstream, because APISIX does not verify the legality of the upstream certificates. Therefore, even if the upstream uses an invalid TLS certificate, it can still be accessed without configuring a root certificate.
768768

769769
## Where can I find more answers?
770770

docs/en/latest/benchmark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ For more reference on how to run the benchmark test, you can see this [PR](https
140140

141141
:::tip
142142

143-
If you want to run the benchmark with a large number of connections, You may have to update the **keepalive** config in the [conf/config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L242). Connections exceeding this number will become short connections. You can run the following command to test the benchmark with a large number of connections:
143+
If you want to run the benchmark with a large number of connections, You may have to update the [**keepalive**](https://github.com/apache/apisix/blob/master/conf/config.yaml.example#L241) config by adding the configuration to [`config.yaml`](https://github.com/apache/apisix/blob/master/conf/config.yaml) and reload APISIX. Connections exceeding this number will become short connections. You can run the following command to test the benchmark with a large number of connections:
144144

145145
```bash
146146
wrk -t200 -c5000 -d30s http://127.0.0.1:9080/hello

docs/en/latest/customize-nginx-configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ title: Customize Nginx configuration
2121
#
2222
-->
2323

24-
The Nginx configuration used by APISIX is generated via the template file `apisix/cli/ngx_tpl.lua` and the options from `conf/config-default.yaml` / `conf/config.yaml`.
24+
The Nginx configuration used by APISIX is generated via the template file `apisix/cli/ngx_tpl.lua` and the parameters in `apisix/cli/config.lua` and `conf/config.yaml`.
2525

2626
You can take a look at the generated Nginx configuration in `conf/nginx.conf` after running `./bin/apisix start`.
2727

28-
If you want to customize the Nginx configuration, please read through the `nginx_config` in `conf/config-default.yaml`. You can override the default value in the `conf/config.yaml`. For instance, you can inject some snippets in the `conf/nginx.conf` via configuring the `xxx_snippet` entries:
28+
If you want to customize the Nginx configuration, please read through the `nginx_config` in `conf/config.default.example`. You can override the default value in the `conf/config.yaml`. For instance, you can inject some snippets in the `conf/nginx.conf` via configuring the `xxx_snippet` entries:
2929

3030
```yaml
3131
...

docs/en/latest/install-dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ title: Install Dependencies
2525

2626
- Since v2.0 Apache APISIX would not support the v2 protocol storage to etcd anymore, and the minimum etcd version supported is v3.4.0. What's more, etcd v3 uses gRPC as the messaging protocol, while Apache APISIX uses HTTP(S) to communicate with etcd cluster, so be sure the [etcd gRPC gateway](https://etcd.io/docs/v3.4.0/dev-guide/api_grpc_gateway/) is enabled.
2727

28-
- Now by default Apache APISIX uses HTTP protocol to talk with etcd cluster, which is insecure. Please configure certificate and corresponding private key for your etcd cluster, and use "https" scheme explicitly in the etcd endpoints list in your Apache APISIX configuration, if you want to keep the data secure and integral. See the etcd section in `conf/config-default.yaml` for more details.
28+
- Now by default Apache APISIX uses HTTP protocol to talk with etcd cluster, which is insecure. Please configure certificate and corresponding private key for your etcd cluster, and use "https" scheme explicitly in the etcd endpoints list in your Apache APISIX configuration, if you want to keep the data secure and integral. See the etcd section in `conf/config.yaml.example` for more details.
2929

3030
- If it is OpenResty 1.19, APISIX will use OpenResty's built-in LuaJIT to run `bin/apisix`; otherwise it will use Lua 5.1. If you encounter `luajit: lj_asm_x86.h:2819: asm_loop_ fixup: Assertion '((intptr_t)target & 15) == 0' failed`, this is a problem with the low version of OpenResty's built-in LuaJIT under certain compilation conditions.
3131

docs/en/latest/installation-guide.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ You can configure your APISIX deployment in two ways:
271271
apisix start -c <path to config file>
272272
```
273273

274-
APISIX will use the configurations added in this configuration file and will fall back to the default configuration if anything is not configured.
274+
APISIX will use the configurations added in this configuration file and will fall back to the default configuration if anything is not configured. The default configurations can be found in `apisix/cli/config.lua` and should not be modified.
275275

276276
For example, to configure the default listening port to be `8000` without changing other configurations, your configuration file could look like this:
277277

@@ -297,12 +297,6 @@ deployment:
297297

298298
:::warning
299299

300-
APISIX's default configuration can be found in `conf/config-default.yaml` file and it should not be modified. It is bound to the source code and the configuration should only be changed by the methods mentioned above.
301-
302-
:::
303-
304-
:::warning
305-
306300
The `conf/nginx.conf` file is automatically generated and should not be modified.
307301

308302
:::

docs/en/latest/plugin-develop.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -117,36 +117,36 @@ local _M = {
117117

118118
Note: The priority of the new plugin cannot be same to any existing ones, you can use the `/v1/schema` method of [control API](./control-api.md#get-v1schema) to view the priority of all plugins. In addition, plugins with higher priority value will be executed first in a given phase (see the definition of `phase` in [choose-phase-to-run](#choose-phase-to-run)). For example, the priority of example-plugin is 0 and the priority of ip-restriction is 3000. Therefore, the ip-restriction plugin will be executed first, then the example-plugin plugin. It's recommended to use priority 1 ~ 99 for your plugin unless you want it to run before some builtin plugins.
119119

120-
In the "__conf/config-default.yaml__" configuration file, the enabled plugins (all specified by plugin name) are listed.
120+
By default, most APISIX plugins are [enabled](https://github.com/apache/apisix/blob/master/apisix/cli/config.lua):
121121

122-
```yaml
123-
plugins: # plugin list
124-
- limit-req
125-
- limit-count
126-
- limit-conn
127-
- key-auth
128-
- prometheus
129-
- node-status
130-
- jwt-auth
131-
- zipkin
132-
- ip-restriction
133-
- grpc-transcode
134-
- serverless-pre-function
135-
- serverless-post-function
136-
- openid-connect
137-
- proxy-rewrite
138-
- redirect
122+
```lua title="apisix/cli/config.lua"
123+
local _M = {
124+
...
125+
plugins = {
126+
"real-ip",
127+
"ai",
128+
"client-control",
129+
"proxy-control",
130+
"request-id",
131+
"zipkin",
132+
"ext-plugin-pre-req",
133+
"fault-injection",
134+
"mocking",
135+
"serverless-pre-function",
136+
...
137+
},
139138
...
139+
}
140140
```
141141

142142
Note: the order of the plugins is not related to the order of execution.
143143

144-
To enable your plugin, copy this plugin list into `conf/config.yaml`, and add your plugin name. For instance:
144+
To enable your custom plugin, add the list of plugins into `conf/config.yaml` and append your plugin name. For instance:
145145

146146
```yaml
147-
plugins: # copied from config-default.yaml
148-
...
149-
- your-plugin
147+
plugins: # see `conf/config.yaml.example` for an example
148+
- ... # add existing plugins
149+
- your-plugin # add your custom plugin
150150
```
151151
152152
If your plugin has a new code directory of its own, and you need to redistribute it with the APISIX source code, you will need to modify the `Makefile` to create directory, such as:

docs/en/latest/plugins/aws-lambda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Server: APISIX/2.10.2
104104
"Hello, APISIX!"
105105
```
106106

107-
Another example of a request where the client communicates with APISIX via HTTP/2 is shown below (make sure you have configured `enable_http2: true` for a in your default configuration file (`config-default.yaml`). You can do this by uncommenting the port `9081` from the field `apisix.node_listen`):
107+
Another example of a request where the client communicates with APISIX via HTTP/2 is shown below. Before proceeding, make sure you have configured `enable_http2: true` in your configuration file `config.yaml` for port `9081` and reloaded APISIX. See [`config.yaml.example`](https://github.com/apache/apisix/blob/master/conf/config.yaml.example) for the example configuration.
108108

109109
```shell
110110
curl -i -XGET --http2 --http2-prior-knowledge localhost:9081/aws\?name=APISIX

docs/en/latest/plugins/azure-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Server: APISIX/2.10.2
119119
Hello, APISIX
120120
```
121121

122-
Another example of a request where the client communicates with APISIX via HTTP/2 is shown below (make sure you have configured `enable_http2: true` in your default configuration file (`config-default.yaml`). You can do this by uncommenting the port `9081` from the field `apisix.node_listen`):
122+
Another example of a request where the client communicates with APISIX via HTTP/2 is shown below. Before proceeding, make sure you have configured `enable_http2: true` in your configuration file `config.yaml` for port `9081` and reloaded APISIX. See [`config.yaml.example`](https://github.com/apache/apisix/blob/master/conf/config.yaml.example) for the example configuration.
123123

124124
```shell
125125
curl -i -XGET --http2 --http2-prior-knowledge http://localhost:9081/azure\?name=APISIX

docs/en/latest/plugins/inspect.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,23 @@ The `info` is a hash table which contains below keys:
8787

8888
## Enable Plugin
8989

90-
Plugin is enabled by default (`conf/config-default.yaml`):
91-
92-
```yaml title="conf/config-default.yaml"
93-
plugins:
94-
- inspect
95-
96-
plugin_attr:
97-
inspect:
98-
delay: 3
99-
hooks_file: "/usr/local/apisix/plugin_inspect_hooks.lua"
90+
Plugin is enabled by default:
91+
92+
```yaml title="apisix/cli/config.lua"
93+
local _M = {
94+
plugins = {
95+
"inspect",
96+
...
97+
},
98+
plugin_attr = {
99+
inspect = {
100+
delay = 3,
101+
hooks_file = "/usr/local/apisix/plugin_inspect_hooks.lua"
102+
},
103+
...
104+
},
105+
...
106+
}
100107
```
101108

102109
## Example usage

docs/en/latest/pubsub.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,13 @@ Add the required fields to the plugin schema definition and write them to the co
106106

107107
The `kafka-proxy` plugin [kafka-proxy.lua](https://github.com/apache/apisix/blob/master/apisix/plugins/kafka-proxy.lua).
108108

109-
Add this plugin to the list of plugins in the APISIX configuration file.
109+
Add this plugin to [the existing list of plugins](https://github.com/apache/apisix/blob/master/apisix/cli/config.yaml.example) in the APISIX configuration file [`config.yaml`](https://github.com/apache/apisix/blob/master/conf/config.yaml). For instance:
110110

111-
The plugins list [config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml).
111+
```yaml title="conf/config.yaml"
112+
plugins: # see `conf/config.yaml.example` for an example
113+
- ... # add existing plugins
114+
- kafka-proxy
115+
```
112116
113117
#### Results
114118

0 commit comments

Comments
 (0)