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 2021/05/07 00:55:29 UTC
[apisix] branch master updated: docs: avoid the misleading comment
(#4189)
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 232134a docs: avoid the misleading comment (#4189)
232134a is described below
commit 232134ad6bae9b8d0484e86bd4128d0a967ff480
Author: 罗泽轩 <sp...@gmail.com>
AuthorDate: Fri May 7 08:55:17 2021 +0800
docs: avoid the misleading comment (#4189)
---
.github/workflows/lint.yml | 17 ------
CONTRIBUTING.md | 1 -
conf/config-default.yaml | 112 +++++++++++++++++++--------------------
conf/config.yaml | 2 -
conf/debug.yaml | 1 -
docs/en/latest/plugin-develop.md | 2 -
t/APISIX.pm | 2 +-
7 files changed, 56 insertions(+), 81 deletions(-)
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 2315594..6356441 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -14,23 +14,6 @@ jobs:
node-version: '12.x'
- run: npm install -g markdownlint-cli@0.25.0
- run: markdownlint '**/*.md'
- yamllint:
- name: 🍺 YAML
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-python@v2
- with:
- python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
- architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install yamllint
- - name: 🧹 YAML Lint
- run: |
- # return non-zero exit code on warnings
- yamllint --strict .
trailing-whitespace:
name: 🌌 Trailing whitespace
runs-on: ubuntu-latest
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 23624d9..56f2d99 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -56,7 +56,6 @@ Once we've discussed your changes and you've got your code ready, make sure that
For linting both our Markdown and YAML files we use:
- npm based [markdownlint-cli](https://www.npmjs.com/package/markdownlint-cli)
- - [yamllint](https://yamllint.readthedocs.io/en/stable/) which can be installed in multiple ways
* Active Voice
diff --git a/conf/config-default.yaml b/conf/config-default.yaml
index 5385d6c..5ed8868 100644
--- a/conf/config-default.yaml
+++ b/conf/config-default.yaml
@@ -28,18 +28,16 @@ apisix:
enable_reuseport: true # Enable nginx SO_REUSEPORT switch if set to true.
enable_ipv6: true
config_center: etcd # etcd: use etcd to store the config value
- # yamllint disable rule:comments-indentation
# 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 port_admin.
+ #proxy_protocol: # Proxy Protocol configuration
+ #listen_http_port: 9181 # The port with proxy protocol for http, it differs from node_listen and port_admin.
# This port can only receive http request with proxy protocol, but node_listen & port_admin
# can only receive http request. If you enable proxy protocol, you must use this port to
# receive http request with proxy protocol
- # listen_https_port: 9182 # The port with proxy protocol for https
- # enable_tcp_pp: true # Enable the proxy protocol for tcp proxy, it works for stream_proxy.tcp option
- # enable_tcp_pp_to_upstream: true # Enables the proxy protocol to the upstream server
- # yamllint enable rule:comments-indentation
+ #listen_https_port: 9182 # The port with proxy protocol for https
+ #enable_tcp_pp: true # Enable the proxy protocol for tcp proxy, it works for stream_proxy.tcp option
+ #enable_tcp_pp_to_upstream: true # Enables the proxy protocol to the upstream server
enable_server_tokens: true # Whether the APISIX version number should be shown in Server header.
# It's enabled by default.
@@ -56,17 +54,17 @@ apisix:
disk_size: 1G # The size of disk, it's used to store the cache data
disk_path: "/tmp/disk_cache_one" # The path to store the cache data
cache_levels: "1:2" # The hierarchy levels of a cache
- # - name: disk_cache_two
- # memory_size: 50m
- # disk_size: 1G
- # disk_path: "/tmp/disk_cache_two"
- # cache_levels: "1:2"
+ #- name: disk_cache_two
+ # memory_size: 50m
+ # disk_size: 1G
+ # disk_path: "/tmp/disk_cache_two"
+ # cache_levels: "1:2"
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
- 127.0.0.0/24 # If we don't set any IP list, then any IP access is allowed by default.
- # - "::/64"
- # port_admin: 9180 # use a separate port
- # https_admin: true # enable HTTPS when use a separate port for Admin API.
+ #- "::/64"
+ #port_admin: 9180 # use a separate port
+ #https_admin: true # enable HTTPS when use a separate port for Admin API.
# Admin API will use conf/apisix_admin_api.crt and conf/apisix_admin_api.key as certificate.
admin_api_mtls: # Depends on `port_admin` and `https_admin`.
admin_ssl_cert: "" # Path of your self-signed server side cert.
@@ -98,24 +96,24 @@ apisix:
# see https://github.com/api7/lua-resty-radixtree/#parameters-in-path for
# more details.
ssl: 'radixtree_sni' # radixtree_sni: match route by SNI(base on radixtree)
- # stream_proxy: # TCP/UDP proxy
- # tcp: # TCP proxy port list
- # - 9100
- # - "127.0.0.1:9101"
- # udp: # UDP proxy port list
- # - 9200
- # - "127.0.0.1:9201"
- # dns_resolver: # If not set, read from `/etc/resolv.conf`
+ #stream_proxy: # TCP/UDP proxy
+ # tcp: # TCP proxy port list
+ # - 9100
+ # - "127.0.0.1:9101"
+ # udp: # UDP proxy port list
+ # - 9200
+ # - "127.0.0.1:9201"
+ #dns_resolver: # If not set, read from `/etc/resolv.conf`
# - 1.1.1.1
# - 8.8.8.8
- # dns_resolver_valid: 30 # if given, override the TTL of the valid records. The unit is second.
+ #dns_resolver_valid: 30 # if given, override the TTL of the valid records. The unit is second.
resolver_timeout: 5 # resolver timeout
enable_resolv_search_opt: true # enable search option in resolv.conf
ssl:
enable: true
enable_http2: true
listen_port: 9443
- # ssl_trusted_certificate: /path/to/ca-cert # Specifies a file path with trusted CA certificates in the PEM format
+ #ssl_trusted_certificate: /path/to/ca-cert # Specifies a file path with trusted CA certificates in the PEM format
# used to verify the certificate when APISIX needs to do SSL/TLS handshaking
# with external services (e.g. etcd)
ssl_protocols: "TLSv1.2 TLSv1.3"
@@ -126,9 +124,9 @@ apisix:
# If set this, must be a string of length 16. And it will encrypt ssl key with AES-128-CBC
# !!! So do not change it after saving your ssl, it can't decrypt the ssl keys have be saved if you change !!
enable_control: true
- # control:
- # ip: "127.0.0.1"
- # port: 9090
+ #control:
+ # ip: "127.0.0.1"
+ # port: 9090
disable_sync_configuration_during_start: false # safe exit. Remove this once the feature is stable
nginx_config: # config for render the template to generate nginx.conf
@@ -142,7 +140,7 @@ nginx_config: # config for render the template to generate n
worker_shutdown_timeout: 240s # timeout for a graceful shutdown of worker processes
event:
worker_connections: 10620
- # envs: # allow to get a list of environment variables
+ #envs: # allow to get a list of environment variables
# - TEST_ENV
# As user can add arbitrary configurations in the snippet,
@@ -185,7 +183,7 @@ nginx_config: # config for render the template to generate n
real_ip_from: # http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
- 127.0.0.1
- 'unix:'
- # lua_shared_dicts: # add custom shared cache to nginx.conf
+ #lua_shared_dicts: # add custom shared cache to nginx.conf
# ipc_shared_dict: 100m # custom shared cache, format: `cache-key: cache-size`
# Enables or disables passing of the server name through TLS Server Name Indication extension (SNI, RFC 6066)
@@ -198,38 +196,38 @@ etcd:
# e.g. "https://127.0.0.1:2379".
prefix: "/apisix" # apisix configurations prefix
timeout: 30 # 30 seconds
- # resync_delay: 5 # when sync failed and a rest is needed, resync after the configured seconds plus 50% random jitter
- # user: root # root username for etcd
- # password: 5tHkHhYkjr6cQY # root password for etcd
+ #resync_delay: 5 # when sync failed and a rest is needed, resync after the configured seconds plus 50% random jitter
+ #user: root # root username for etcd
+ #password: 5tHkHhYkjr6cQY # root password for etcd
tls:
# To enable etcd client certificate you need to build APISIX-Openresty, see
# http://apisix.apache.org/docs/apisix/how-to-build#6-build-openresty-for-apisix
- # cert: /path/to/cert # path of certificate used by the etcd client
- # key: /path/to/key # path of key used by the etcd client
+ #cert: /path/to/cert # path of certificate used by the etcd client
+ #key: /path/to/key # path of key used by the etcd client
verify: true # whether to verify the etcd endpoint certificate when setup a TLS connection to etcd,
# the default value is true, e.g. the certificate will be verified strictly.
-# discovery: # service discovery center
-# dns:
-# resolver:
-# - "127.0.0.1:8600" # use the real address of your dns server
-# eureka:
-# host: # it's possible to define multiple eureka hosts addresses of the same eureka cluster.
-# - "http://127.0.0.1:8761"
-# prefix: "/eureka/"
-# fetch_interval: 30 # default 30s
-# weight: 100 # default weight for node
-# timeout:
-# connect: 2000 # default 2000ms
-# send: 2000 # default 2000ms
-# read: 5000 # default 5000ms
+#discovery: # service discovery center
+# dns:
+# resolver:
+# - "127.0.0.1:8600" # use the real address of your dns server
+# eureka:
+# host: # it's possible to define multiple eureka hosts addresses of the same eureka cluster.
+# - "http://127.0.0.1:8761"
+# prefix: "/eureka/"
+# fetch_interval: 30 # default 30s
+# weight: 100 # default weight for node
+# timeout:
+# connect: 2000 # default 2000ms
+# send: 2000 # default 2000ms
+# read: 5000 # default 5000ms
graphql:
max_size: 1048576 # the maximum size limitation of graphql in bytes, default 1MiB
-# ext-plugin:
- # cmd: ["ls", "-l"]
+#ext-plugin:
+ #cmd: ["ls", "-l"]
plugins: # plugin list (sorted in alphabetical order)
- api-breaker
@@ -238,10 +236,10 @@ plugins: # plugin list (sorted in alphabetical order)
- batch-requests
- consumer-restriction
- cors
- # - dubbo-proxy
+ #- dubbo-proxy
- echo
- # - error-log-logger
- # - example-plugin
+ #- error-log-logger
+ #- example-plugin
- ext-plugin-pre-req
- ext-plugin-post-req
- fault-injection
@@ -255,8 +253,8 @@ plugins: # plugin list (sorted in alphabetical order)
- limit-conn
- limit-count
- limit-req
- # - log-rotate
- # - node-status
+ #- log-rotate
+ #- node-status
- openid-connect
- prometheus
- proxy-cache
@@ -269,7 +267,7 @@ plugins: # plugin list (sorted in alphabetical order)
- response-rewrite
- serverless-post-function
- serverless-pre-function
- # - skywalking
+ #- skywalking
- sls-logger
- syslog
- tcp-logger
diff --git a/conf/config.yaml b/conf/config.yaml
index 29b9739..59a6a2c 100644
--- a/conf/config.yaml
+++ b/conf/config.yaml
@@ -33,7 +33,5 @@
apisix:
admin_key:
- name: "admin"
- # yamllint disable rule:comments-indentation
key: edd1c9f034335f136f87ad84b625c8f1 # using fixed API token has security risk, please update it when you deploy to production environment
- # yamllint enable rule:comments-indentation
role: admin
diff --git a/conf/debug.yaml b/conf/debug.yaml
index ca59252..b3527e1 100644
--- a/conf/debug.yaml
+++ b/conf/debug.yaml
@@ -28,5 +28,4 @@ hook_phase: # module and function list, name: hook_phase
- http_body_filter_phase
- http_log_phase
-# yamllint disable-line rule:comments
#END
diff --git a/docs/en/latest/plugin-develop.md b/docs/en/latest/plugin-develop.md
index 01234b3..67535a4 100644
--- a/docs/en/latest/plugin-develop.md
+++ b/docs/en/latest/plugin-develop.md
@@ -139,9 +139,7 @@ To enable your plugin, copy this plugin list into `conf/config.yaml`, and add yo
apisix:
admin_key:
- name: "admin"
- # yamllint disable rule:comments-indentation
key: edd1c9f034335f136f87ad84b625c8f1 # using fixed API token has security risk, please update it when you deploy to production environment
- # yamllint enable rule:comments-indentation
role: admin
plugins: # copied from config-default.yaml
diff --git a/t/APISIX.pm b/t/APISIX.pm
index 811a7c6..c2a5359 100644
--- a/t/APISIX.pm
+++ b/t/APISIX.pm
@@ -79,7 +79,7 @@ if ($custom_dns_server) {
my $default_yaml_config = read_file("conf/config-default.yaml");
# enable example-plugin as some tests require it
-$default_yaml_config =~ s/# - example-plugin/- example-plugin/;
+$default_yaml_config =~ s/#- example-plugin/- example-plugin/;
$default_yaml_config =~ s/enable_export_server: true/enable_export_server: false/;
my $user_yaml_config = read_file("conf/config.yaml");