docs: update plugin docs with ADC and Ingress Controller examples#13336
Open
Yilialinn wants to merge 7 commits intoapache:masterfrom
Open
docs: update plugin docs with ADC and Ingress Controller examples#13336Yilialinn wants to merge 7 commits intoapache:masterfrom
Yilialinn wants to merge 7 commits intoapache:masterfrom
Conversation
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
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
d497515 to
4955b3b
Compare
- 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
There was a problem hiding this comment.
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
serverlessandauthz-keycloakdocs).
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. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
admin_keyenvironment variable for better securityRelated PRs
Testing
All examples have been verified for syntax correctness and formatting. The documentation builds successfully with the changes.