Skip to content

Add health check documentation for the Gateway Controller and Gateway Runtime - #413

Open
tharindu1st wants to merge 1 commit into
wso2:mainfrom
tharindu1st:main
Open

Add health check documentation for the Gateway Controller and Gateway Runtime#413
tharindu1st wants to merge 1 commit into
wso2:mainfrom
tharindu1st:main

Conversation

@tharindu1st

Copy link
Copy Markdown
Contributor

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.

The API Platform Gateway setup docs had no page explaining how to configure liveness and readiness checks for the Gateway Controller, Router, and Policy Engine, so operators wiring Docker Compose or Kubernetes probes had no reference for the available health endpoints. This PR adds that page and pins setuptools in the docs build environment to keep the site build stable.

Resolves:

Checklist

  • Verified that llms.txt (located at en/docs/llms.txt) is updated for AI readiness content.
  • Ensured meaningful alt text for images and that the information contained in an image also appears in text so the relevant info exists in the body of the document.
  • Added or updated frontmatter for the respective pages.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

  • Document the health endpoints exposed by the Gateway Controller (/api/admin/v1/health), the Router (/_gateway-health/healthy and /_gateway-health/ready), and the Policy Engine (/health).
  • Show how to wire those endpoints into Docker Compose healthcheck blocks and Kubernetes readinessProbe/livenessProbe configuration.
  • Keep the docs build reproducible by pinning setuptools to a version below 81.

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

As a platform operator deploying the API Platform Gateway, I want documented health-check endpoints and probe configuration examples so I can configure Docker Compose and Kubernetes to detect and restart unhealthy gateway components.

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Added documentation for configuring liveness and readiness health checks for the Gateway Controller, Router, and Policy Engine.

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter "N/A" plus brief explanation of why there's no doc impact

This PR is entirely a documentation change: en/docs/api-gateway/next/setup/health-checks.md.

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

N/A — no training content covers gateway health checks yet.

Certification

Type "Sent" when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type "N/A" and explain why.

N/A — documentation-only addition, no product behavior change to certify.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

N/A

Automation tests

  • Unit tests

    Code coverage information

    N/A — documentation-only change.

  • Integration tests

    Details about the test cases and coverage

    Verified locally that mkdocs build succeeds and the new page renders with working navigation links.

Security checks

Samples

Provide high-level details about the samples related to this feature

N/A

Related PRs

List any other related PRs

None

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

N/A

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Built and previewed with mkdocs serve on Linux.

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Reviewed the Gateway Controller, Router, and Policy Engine source configuration for their admin/health ports and endpoint paths to document accurate defaults and auth-exemption behavior.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Added an API Gateway health checks guide. It documents health endpoints, probe configurations, access behavior, and test commands. Navigation includes the guide, and existing examples use /api/admin/v1/health.

Changes

Health checks documentation

Layer / File(s) Summary
Health endpoint guide
en/docs/api-gateway/next/setup/health-checks.md
Documents Gateway Controller, Router, and Policy Engine health endpoints, responses, ports, access behavior, and curl commands.
Deployment probe configurations
en/docs/api-gateway/next/setup/health-checks.md
Adds Docker Compose and Kubernetes health checks for the Gateway Controller and Gateway Runtime.
Documentation wiring and endpoint updates
en/mkdocs.yml, en/docs/llms.txt, en/docs/api-gateway/next/setup/artifact-templating.md, en/docs/api-gateway/next/setup/health-checks.md, en/docs/api-gateway/next/deployment/deployment-modes/kubernetes/kubernetes-standalone.md, en/docs/api-gateway/next/deployment/production-deployment/deploy-and-verify.md
Adds navigation and documentation index links. Updates controller health-check examples and exposes port 9094 in the Kubernetes standalone example.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: anugayan

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: health check documentation for the Gateway Controller and Gateway Runtime.
Description check ✅ Passed The description follows the template and explains the purpose, implementation, testing, documentation, and related impact of the changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@en/docs/api-gateway/next/setup/health-checks.md`:
- Line 17: Update the introductory sentence in the health-checks guide to
replace the ambiguous “they’re ready” wording with an explicit component
subject, and spell out “HTTP” as “Hypertext Transfer Protocol (HTTP)” at its
first use.
- Line 2: Update the page title and corresponding H1 in the health-check
documentation to use sentence case: change “Health Checks” to “Health checks”
while preserving “Gateway Controller” and “Gateway Runtime” as component names.
- Around line 89-148: The “Configuring health checks” section needs an ordered
procedure under both the Docker Compose and Kubernetes tabs. Add numbered steps
describing each configuration action, and place each existing YAML block
immediately after the step that introduces it while preserving the current
health paths and probe settings.
- Around line 105-111: Update the gateway-runtime health checks in the Compose
and Kubernetes examples to account for Policy Engine health, either by probing
both Router and Policy Engine readiness or by explicitly documenting that Router
readiness includes the Policy Engine dependency. Keep the existing health-check
settings unchanged apart from this dependency coverage.
- Line 37: Update the health-checks documentation to define JSON, IP, and HTTPS
at their first occurrences, and replace every “basic auth” or “basic-auth”
reference with “Basic authentication.” Apply the terminology consistently across
the referenced sections.
- Around line 19-23: Update the Gateway Controller entry in the “three health
surfaces” overview to use the current `/api/admin/v1/health` path instead of
`/health`, matching the endpoint table and deprecation guidance; leave the
Router and Policy Engine entries unchanged.
- Line 3: Shorten the frontmatter description to fewer than 158 characters and
accurately distinguish the health-check endpoints: Controller and Policy Engine
use /health, while Router uses /_gateway-health.
- Around line 35-42: Resolve the health-check documentation mismatch by
comparing the version-matched Controller deployment configuration, then align
the port and endpoint path across health-checks.md, quick-start examples,
deploy-and-verify.md, and Kubernetes standalone examples. Preserve a documented
distinction only if the configurations genuinely use different health endpoints.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 73f5a5ce-584f-43c6-aaa2-6ed76d71a89f

📥 Commits

Reviewing files that changed from the base of the PR and between 8d42f29 and da58329.

📒 Files selected for processing (3)
  • en/docs/api-gateway/next/setup/artifact-templating.md
  • en/docs/api-gateway/next/setup/health-checks.md
  • en/mkdocs.yml

Comment thread en/docs/api-gateway/next/setup/health-checks.md Outdated
Comment thread en/docs/api-gateway/next/setup/health-checks.md
Comment thread en/docs/api-gateway/next/setup/health-checks.md Outdated
Comment thread en/docs/api-gateway/next/setup/health-checks.md
Comment thread en/docs/api-gateway/next/setup/health-checks.md Outdated
Comment thread en/docs/api-gateway/next/setup/health-checks.md Outdated
Comment thread en/docs/api-gateway/next/setup/health-checks.md Outdated
Comment thread en/docs/api-gateway/next/setup/health-checks.md Outdated
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@en/docs/api-gateway/next/deployment/deployment-modes/kubernetes/kubernetes-standalone.md`:
- Line 245: Update the Kubernetes standalone health-check instructions around
the curl command to ensure port 9094 is reachable: either forward both 9090 and
9094 for the ap-gateway-controller service, or replace the local curl with the
established in-pod execution command from deploy-and-verify.md.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7c417d02-5aa3-4308-b935-991ac27cf1be

📥 Commits

Reviewing files that changed from the base of the PR and between 4da76f2 and f367358.

📒 Files selected for processing (5)
  • en/docs/api-gateway/next/deployment/deployment-modes/kubernetes/kubernetes-standalone.md
  • en/docs/api-gateway/next/deployment/production-deployment/deploy-and-verify.md
  • en/docs/api-gateway/next/setup/artifact-templating.md
  • en/docs/api-gateway/next/setup/health-checks.md
  • en/mkdocs.yml

coderabbitai[bot]
coderabbitai Bot previously approved these changes Aug 6, 2026
@tharindu1st

Copy link
Copy Markdown
Contributor Author

@coderabbitai review and approve

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

@tharindu1st I will review pull request #413 and approve it if the review finds no blocking issues.

✅ Action performed

Comments resolved and changes approved.


Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
en/docs/api-gateway/next/setup/health-checks.md (1)

3-3: 🎯 Functional Correctness | 🟡 Minor

Correct the page description.

The description exceeds 158 characters and incorrectly implies that all components use /_gateway-health. The Gateway Controller uses /api/admin/v1/health, and the Policy Engine uses /health.

Proposed fix
-description: "Configure liveness and readiness health checks for the API Platform Gateway Controller, Router, and Policy Engine using the dedicated /_gateway-health endpoints, and wire them into Docker Compose or Kubernetes probes."
+description: "Configure liveness and readiness probes for the Gateway Controller, Router, and Policy Engine in Docker Compose or Kubernetes."

As per path instructions, the description must be shorter than 158 characters and accurately summarize the page.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/api-gateway/next/setup/health-checks.md` at line 3, Update the page
frontmatter description to fewer than 158 characters, accurately distinguishing
the Gateway Controller endpoint (/api/admin/v1/health), Policy Engine endpoint
(/health), and Router health checks without implying they all use
/_gateway-health.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@en/docs/api-gateway/next/deployment/deployment-modes/kubernetes/kubernetes-standalone.md`:
- Around line 243-245: Update the “Verify gateway controller admin endpoint is
running” heading to a clear sentence-case title using the documented component
name and possessive phrasing, then add a blank line before the following fenced
bash block to satisfy Markdown spacing rules.

In `@en/docs/api-gateway/next/setup/health-checks.md`:
- Around line 127-140: Update the readinessProbe and livenessProbe examples in
the health-check documentation to be self-contained Kubernetes YAML, including
the surrounding spec.template.spec.containers structure and correct indentation
showing where each probe belongs; apply the same fix to the additional probe
example.

---

Duplicate comments:
In `@en/docs/api-gateway/next/setup/health-checks.md`:
- Line 3: Update the page frontmatter description to fewer than 158 characters,
accurately distinguishing the Gateway Controller endpoint
(/api/admin/v1/health), Policy Engine endpoint (/health), and Router health
checks without implying they all use /_gateway-health.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4aa57217-a3ca-4694-a225-2606e8bc2dc3

📥 Commits

Reviewing files that changed from the base of the PR and between 4da76f2 and b062fc8.

📒 Files selected for processing (6)
  • en/docs/api-gateway/next/deployment/deployment-modes/kubernetes/kubernetes-standalone.md
  • en/docs/api-gateway/next/deployment/production-deployment/deploy-and-verify.md
  • en/docs/api-gateway/next/setup/artifact-templating.md
  • en/docs/api-gateway/next/setup/health-checks.md
  • en/docs/llms.txt
  • en/mkdocs.yml

Comment thread en/docs/api-gateway/next/setup/health-checks.md
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@en/docs/api-gateway/next/setup/health-checks.md`:
- Line 68: Shorten the probe instruction sentences at the documented lines to
fewer than 26 words each. Split the sentence around the “Both paths”
explanation, and at the instructions near the liveness/readiness examples, place
each condition before the action it controls while preserving the existing
meaning.
- Line 45: Rewrite the endpoint explanations in the health-checks documentation
using active present-tense voice: make the Gateway Controller or its
configuration the subject when describing IP allowlisting, Basic authentication,
and exemptions for /api/admin/v1/health and /health, and make the responsible
routing component or configuration the subject of the reserved path-prefix
sentence. Preserve the documented access behavior for health endpoints and all
other admin paths.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4b6fddde-6013-4b6f-b2bb-3b938b46667f

📥 Commits

Reviewing files that changed from the base of the PR and between 4da76f2 and 0f46e68.

📒 Files selected for processing (6)
  • en/docs/api-gateway/next/deployment/deployment-modes/kubernetes/kubernetes-standalone.md
  • en/docs/api-gateway/next/deployment/production-deployment/deploy-and-verify.md
  • en/docs/api-gateway/next/setup/artifact-templating.md
  • en/docs/api-gateway/next/setup/health-checks.md
  • en/docs/llms.txt
  • en/mkdocs.yml

curl http://localhost:9094/api/admin/v1/health
```

The Gateway Controller admin API is protected by an Internet Protocol (IP) allowlist and, when configured, Basic authentication. Both `/api/admin/v1/health` and the legacy `/health` are exempt from both checks, so Docker and Kubernetes probes can reach them without credentials. Every other admin path still requires an allowed IP and, if enabled, valid credentials.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use active voice in the endpoint explanations.

Line 45 uses passive constructions for API protection and health-endpoint exemptions. Line 70 uses passive wording for the reserved path prefix. Rewrite these sentences with the responsible component or configuration as the subject.

As per path instructions, Markdown under en/docs/ uses active present-tense voice.

Also applies to: 70-70

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/api-gateway/next/setup/health-checks.md` at line 45, Rewrite the
endpoint explanations in the health-checks documentation using active
present-tense voice: make the Gateway Controller or its configuration the
subject when describing IP allowlisting, Basic authentication, and exemptions
for /api/admin/v1/health and /health, and make the responsible routing component
or configuration the subject of the reserved path-prefix sentence. Preserve the
documented access behavior for health endpoints and all other admin paths.

Source: Path instructions

curl -k https://localhost:8443/_gateway-health/ready
```

Both paths answer on both ports; the example above simply pairs liveness with the HTTP listener and readiness with the Hypertext Transfer Protocol Secure (HTTPS) listener.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Split the long probe instructions.

Line 68 has 26 words. Lines 108 and 163 exceed 26 words. Split each sentence into shorter sentences. Place the condition before the dependent action at Lines 108 and 163.

As per path instructions, documentation uses sentences with fewer than 26 words and places conditional clauses before their consequences.

Also applies to: 108-108, 163-163

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/api-gateway/next/setup/health-checks.md` at line 68, Shorten the
probe instruction sentences at the documented lines to fewer than 26 words each.
Split the sentence around the “Both paths” explanation, and at the instructions
near the liveness/readiness examples, place each condition before the action it
controls while preserving the existing meaning.

Source: Path instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant