Skip to content

docs: update plugin docs with ADC and Ingress Controller examples#13336

Open
Yilialinn wants to merge 7 commits intoapache:masterfrom
Yilialinn:docs/update-plugins-with-tabs
Open

docs: update plugin docs with ADC and Ingress Controller examples#13336
Yilialinn wants to merge 7 commits intoapache:masterfrom
Yilialinn:docs/update-plugins-with-tabs

Conversation

@Yilialinn
Copy link
Copy Markdown
Contributor

Summary

Update plugin documentation for aws-lambda, public-api, real-ip, authz-keycloak, and serverless plugins with comprehensive configuration examples for different deployment methods.

Changes

  • Add ADC (API7 Declarative Config) examples: Show how to configure each plugin using declarative YAML configuration
  • Add Ingress Controller examples: Provide both Gateway API and APISIX CRD examples for Kubernetes deployments
  • Improve Admin API examples: Update curl commands to use admin_key environment variable for better security
  • Add multi-tab interface: Organize examples using tabs to make it easier for users to find their preferred configuration method
  • Enhance example descriptions: Improve clarity and add more context for each example

Related PRs

  • api7/docs#1554 (aws-lambda, public-api, real-ip, serverless-functions)
  • api7/docs#1556 (authz-keycloak)

Testing

All examples have been verified for syntax correctness and formatting. The documentation builds successfully with the changes.

Update plugin documentation for aws-lambda, public-api, real-ip,
authz-keycloak, and serverless plugins with:

- Add ADC (API7 Declarative Config) configuration examples
- Add Ingress Controller (Gateway API and APISIX CRD) configuration examples
- Update examples with admin_key environment variable usage
- Improve example descriptions and formatting
- Add multi-tab interface for different configuration methods

These updates enhance the documentation by providing examples for
multiple ways to configure APISIX plugins, making it easier for users
working with different deployment methods.

Related: api7/docs#1554, api7/docs#1556
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. doc Documentation things labels May 7, 2026
OpenCode added 4 commits May 7, 2026 11:32
…ples

Update Chinese documentation for aws-lambda, public-api, real-ip,
authz-keycloak, and serverless plugins to match the English version
updates:

- Add ADC (API7 Declarative Config) configuration examples
- Add Ingress Controller (Gateway API and APISIX CRD) examples
- Add multi-tab interface for different configuration methods
- Translate new example descriptions and instructions to Chinese
- Keep code blocks and YAML configurations in English
- Update curl commands to use admin_key environment variable

This ensures Chinese-speaking users have the same comprehensive
documentation as English-speaking users.
Remove '// Annotate N' style comments and convert circled number
annotations (❶ ❷ ❸) to standard list format with dashes.

APISIX documentation does not use API7's annotation style with
inline comments and circled numbers. Instead, use standard markdown
lists or inline explanations.

Changes:
- Remove all '// Annotate N' comments from code blocks
- Convert ❶ ❷ ❸ ❹ ❺ etc. to standard '- ' list items
- Applied to both English and Chinese documentation

This ensures consistency with APISIX documentation standards.
Replace English punctuation with Chinese punctuation in Chinese
documentation where appropriate:
- , (comma) → ,(Chinese comma)
- : (colon) → :(Chinese colon)
- ; (semicolon) → ;(Chinese semicolon)

Chinese documentation should use Chinese punctuation marks to
follow proper Chinese writing conventions.

Affected plugins:
- authz-keycloak (116 changes)
- aws-lambda (80 changes)
- public-api (56 changes)
- real-ip (52 changes)
- serverless (30 changes)
- Remove trailing spaces from markdown files (MD009)
- Fix Chinese punctuation (commas and spacing around parentheses)
- Apply autocorrect fixes to Chinese documentation
@Yilialinn Yilialinn force-pushed the docs/update-plugins-with-tabs branch from d497515 to 4955b3b Compare May 7, 2026 04:46
- Change English comma to Chinese comma in zh public-api.md line 41
- Remove broken link to apisix-cli.md (file does not exist in APISIX docs)
- Keep plain text 'reload APISIX' consistent with other plugin docs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates multiple plugin documentation pages (EN + ZH) to add richer, deployment-specific configuration examples (Admin API, ADC, and Kubernetes via Ingress Controller), and to reorganize examples using a tabbed UI.

Changes:

  • Added ADC (declarative YAML) examples and Kubernetes Ingress Controller examples (Gateway API + APISIX CRD) across several plugin docs.
  • Refactored/expanded examples and descriptions (including improved Admin API commands using ${admin_key} patterns).
  • Added canonical links and reorganized sections (notably in serverless and authz-keycloak docs).

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
docs/zh/latest/plugins/serverless.md Adds canonical link + tabbed examples for configuring serverless plugins across Admin API/ADC/Ingress Controller.
docs/zh/latest/plugins/real-ip.md Adds ADC + Ingress Controller examples for typical real-ip configurations.
docs/zh/latest/plugins/public-api.md Adds admin_key note + tabbed examples for Prometheus and batch endpoint exposure across deployment methods.
docs/zh/latest/plugins/aws-lambda.md Adds ADC + Ingress Controller examples for IAM/API-key Lambda integrations and improves walkthrough content.
docs/zh/latest/plugins/authz-keycloak.md Major expansion with Docker/Kubernetes setup tabs and tabbed configuration examples (Admin API/ADC/Ingress Controller).
docs/en/latest/plugins/serverless.md Major expansion: multiple tabbed scenarios (logging, custom vars, response body modification) + canonical link.
docs/en/latest/plugins/real-ip.md Adds canonical link + tabbed Admin API/ADC/Ingress Controller examples; refines narrative.
docs/en/latest/plugins/public-api.md Adds admin_key note + tabbed examples across Admin API/ADC/Ingress Controller.
docs/en/latest/plugins/aws-lambda.md Adds tabbed examples across Admin API/ADC/Ingress Controller and improves walkthrough visuals/text.
docs/en/latest/plugins/authz-keycloak.md Major expansion with Docker/Kubernetes setup tabs and tabbed configuration examples (Admin API/ADC/Ingress Controller).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 113 to +119
"serverless-pre-function": {
"phase": "rewrite",
"functions": ["return function() ngx.log(ngx.ERR, \"serverless pre function\"); end"]
"functions" : [
"return function()
ngx.log(ngx.ERR, \"serverless pre function\");
end"
]
Comment on lines +382 to +391
"return function()
local core = require \"apisix.core\"
core.ctx.register_var(\"a6_route_labels\", function(ctx)
local route = ctx.matched_route and ctx.matched_route.value
if route and route.labels then
return route.labels
end
return nil
end);
end"
Comment on lines +789 to +809
"return function(conf, ctx)
local core = require(\"apisix.core\")
core.response.clear_header_as_body_modified()
end"
]
},
"serverless-post-function": {
"phase": "body_filter",
"functions" : [
"return function(conf, ctx)
local cjson = require(\"cjson\")
local core = require(\"apisix.core\")
local body = core.response.hold_body_chunk(ctx)
if not body then
return
end
body = cjson.decode(body)
body.origin = nil
body = cjson.encode(body)
ngx.arg[1] = body
end"
Comment on lines 112 to +118
"serverless-pre-function": {
"phase": "rewrite",
"functions": ["return function() ngx.log(ngx.ERR, \"serverless pre function\"); end"]
"functions" : [
"return function()
ngx.log(ngx.ERR, \"serverless pre function\");
end"
]
| password_grant_token_generation_incoming_uri | string | 否 | | /api/token | 设置此项以使用密码授权类型生成令牌。插件会将传入请求的 URI 与此值进行比较。 |

注意schema 中还定义了 `encrypt_fields = {"client_secret"}`这意味着该字段将以加密方式存储在 etcd 中。请参阅[加密存储字段](../../../en/latest/plugin-develop.md#encrypted-storage-fields)。
注意:schema 中还定义了 `encrypt_fields = {"client_secret"}`,这意味着该字段将以加密方式存储在 etcd 中。请参阅[加密存储字段](../plugin-develop.md#encrypted-storage-fields)。
Comment on lines +36 to +38
The `real-ip` Plugin allows APISIX to set the client's real IP by IP address passed in the HTTP header or HTTP query string. This is particularly useful when APISIX is behind a reverse proxy, since the proxy could act as the request originating client otherwise.

The Plugin is functionally similar to NGINX's [ngx_http_realip_module](https://nginx.org/en/docs/http/ngx_http_realip_module.html) but offers more flexibility.
The Plugin is functionally similar to NGINX's [ngx_http_realip_module](https://nginx.org/en/docs/http/ngx_http_realip_module.html) but offers more flexibilities.
Comment thread docs/en/latest/plugins/real-ip.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Documentation things size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants