Skip to content

feat(status): expose mode on /version and GET /authz - #1899

Open
neiljar wants to merge 1 commit into
kmesh-net:mainfrom
neiljar:mcp-gw/status-api
Open

feat(status): expose mode on /version and GET /authz#1899
neiljar wants to merge 1 commit into
kmesh-net:mainfrom
neiljar:mcp-gw/status-api

Conversation

@neiljar

@neiljar neiljar commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind enhancement

What this PR does / why we need it:

Expose daemon dataplane mode on GET /version and add GET /authz returning {"enabled": bool}.

Today dump/BPF callers must guess kernel-native vs dual-engine, and kmeshctl authz status GETs /authz but the status server only allowed POST. This is groundwork for the MCP server (#1800) so tools like get_version, config_dump, and get_authz_status can use structured status APIs.

Which issue(s) this PR fixes:
Related to #1800

Special notes for your reviewer:

  • mode is filled from BpfConfig.Mode (default dual-engine); omitted for client-only version info via omitempty
  • POST /authz?enable= behavior unchanged

Does this PR introduce a user-facing change?:

status server: /version includes dataplane mode; GET /authz returns authz offload enabled status

Signed-off-by: Neil <neiljar888@gmail.com>
@kmesh-bot kmesh-bot added the kind/enhancement New feature or request label Aug 8, 2026
@kmesh-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yaozengzeng for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.46%. Comparing base (32fe3df) to head (5f5f872).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/status/status_server.go 0.00% 19 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Files with missing lines Coverage Δ
pkg/version/version.go 0.00% <ø> (ø)
pkg/status/status_server.go 34.05% <0.00%> (-1.76%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 045678d...5f5f872. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

kind/enhancement New feature or request size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants