Skip to content

Use deployment configuration for the router status Service IP - #1737

Open
Robbie Cronin (robert-cronin) wants to merge 2 commits into
agent-substrate:mainfrom
robert-cronin:flere/issue-1457-router-status-rbac
Open

Robbie Cronin (robert-cronin) wants to merge 2 commits into
agent-substrate:mainfrom
robert-cronin:flere/issue-1457-router-status-rbac

Conversation

@robert-cronin

@robert-cronin Robbie Cronin (robert-cronin) commented Sep 18, 2026

Copy link
Copy Markdown

Fixes #1457

The shipped router's /statusz handler tries to read a Service that its ServiceAccount cannot access. Read optional ROUTER_SERVICE_IP deployment configuration instead, mapped from Kubernetes' ATENET_ROUTER_SERVICE_HOST, and install the Service before the Deployment. The handler no longer makes the synchronous Service API request; the existing EndpointSlice-only Role is sufficient.

Label the address as a container-start snapshot, independent of --namespace. Missing or invalid configuration displays Unavailable in HTML and an empty router_cluster_ip string in JSON. Service recreation can leave the snapshot stale until restart. Document these semantics and cover IPv4, IPv6, missing/invalid values, HTML/JSON output, namespace independence, and zero Kubernetes API actions.

Validation: make verify and the router packages under -race passed. A full local Envoy installation passed the gVisor and micro-VM E2E lanes, including the separate MITM trust and egress-networking runs for both runtimes. Live HTTP checks covered fresh full/raw installs, missing/disabled injection, an unrelated namespace, egress, and readiness; real ServiceAccount checks denied Service access while preserving EndpointSlice permissions. The Kind volume tests used the repository-supported hostpath CSI driver because this host lacks NFS support.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Signed-off-by: Robert Cronin <robert.owen.cronin@gmail.com>
@robert-cronin
Robbie Cronin (robert-cronin) marked this pull request as ready for review September 18, 2026 10:40

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we're assuming a static service name, why not use the ATENET_ROUTER_SERVICE_HOST env var that gets auto injected

@bowei
Bowei Du (bowei) added this pull request to the merge queue Sep 18, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 18, 2026
Signed-off-by: Robert Cronin <robert.owen.cronin@gmail.com>
@robert-cronin Robbie Cronin (robert-cronin) changed the title Allow the router status page to read its Service IP Use deployment configuration for the router status Service IP Sep 19, 2026
@robert-cronin

Copy link
Copy Markdown
Author

Switched this to ROUTER_SERVICE_IP, mapped from Kubernetes' ATENET_ROUTER_SERVICE_HOST, and removed the Service lookup and added RBAC grant. The manifest installs the Service first. /statusz labels the value as a container-start snapshot and shows Unavailable when injection is missing or invalid (an empty string in JSON); recreating the Service can leave it stale until restart.

Validated fresh full/raw installs, missing/disabled injection, namespace independence, egress, and readiness on Kind. make verify and both full Envoy gVisor/micro-VM E2E lanes passed, including the separate MITM trust and egress tests. Volume tests used hostpath CSI on the local cluster.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

atenet router /statusz: Service IP panel is forbidden by the router's own shipped RBAC

3 participants