Skip to content

deploy, e2e: expose ax-server-runner :8081 only to atenet-egress in NetworkPolicy - #631

Merged
siyuanfoundation merged 2 commits into
google:mainfrom
siyuanfoundation:net
Nov 17, 2026
Merged

siyuanfoundation merged 2 commits into
google:mainfrom
siyuanfoundation:net

Conversation

@siyuanfoundation

@siyuanfoundation siyuanfoundation commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds the ax-server-runner Kubernetes Service (:8081) and updates the ax-server NetworkPolicy (in both deploy/ax-server.yaml and test/e2e/manifests/ax-server.yaml) so Substrate's egress gateway (atenet-egress) has a deliberate, port-scoped path into ax-server's runner HTTP listener while keeping :8080 and :9090 blocked from sandboxes.

Key Changes

  • deploy/ax-server.yaml & test/e2e/manifests/ax-server.yaml:
    • Added Service ax-server-runner exposing port 8081 (targetPort: 8081, selector app.kubernetes.io/name: ax-server).
    • Scoped NetworkPolicy ax-server ingress by port:
      • :8080 (gRPC control plane) and :9090 (metrics) remain blocked from ate.dev/worker-pool and app: atenet-egress (preserving #582 and TestE2E_GatewayEgress).
      • :8081 (ax-server-runner) is allowed only from app: atenet-egress pods in namespace ate-system, ensuring all sandbox runner requests traverse Substrate's egress gateway (for Actor JWT injection) and worker pods (ate.dev/worker-pool) still cannot reach ax-server directly on any port.
  • deploy/embed_test.go: Verified Service ax-server-runner (8081) and atenet-egress selector render cleanly.
  • skills/substrate/SKILL.md: Synced the ax-server NetworkPolicy summary.

Testing

  • make verify (0 issues)
  • go build ./cmd/ax ./cmd/ax-server ./cmd/ax-task-runner
  • go test -race -count=1 ./deploy/...

…olicy

- Add Service ax-runner (:8081) in deploy/ax-server.yaml and test/e2e/manifests/ax-server.yaml.
- Scope NetworkPolicy ax-server ingress by port so :8080 and :9090 remain blocked from worker pods and atenet-egress, while :8081 is reachable only from app=atenet-egress in ate-system.
- Update deploy/embed_test.go and skills/substrate/SKILL.md.

Signed-off-by: siyuanfoundation <[email protected]>
@siyuanfoundation

Copy link
Copy Markdown
Collaborator Author

/cc @mayawang @itssimrank

@yongruilin yongruilin left a comment

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.

Does it mean every task need to bind a Gateway that has a egress policy with actorjwt and pointing to this new service?

Comment thread test/e2e/manifests/ax-server.yaml Resolved
Comment thread deploy/ax-server.yaml Resolved
Comment thread deploy/ax-server.yaml Resolved
@yongruilin

Copy link
Copy Markdown
Collaborator

This ties ax-server's runner channel to Substrate's built-in egress gateway in two places: the policy selects it by pod label, and it is what attaches the ActorJWT. Substrate lets an install replace that gateway and only encourages the replacement to honor EgressPolicy, so a swapped gateway would be blocked on :8081 and, not matching the label, allowed on :8080. Could the gateway's selector be a manifest parameter, or should the plan say what a replacement gateway must support?

@yongruilin yongruilin left a comment

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.

Synced offline. This change is needed for all task-runner to talk back to ax-server.

@siyuanfoundation siyuanfoundation changed the title deploy, e2e: expose ax-runner :8081 only to atenet-egress in NetworkPolicy deploy, e2e: expose ax-server-runner :8081 only to atenet-egress in NetworkPolicy Nov 17, 2026
@siyuanfoundation
siyuanfoundation merged commit e925acc into google:main Nov 17, 2026
12 checks passed
itssimrank added a commit that referenced this pull request Nov 18, 2026
#635)

* runnerhttp, server: add :8081 runner HTTP handler, Actor JWT auth, and egress rule

* lifecycle: fix crash detection on in-memory restore, guard terminal events, and return IDLE for interactive tasks

* runnerhttp: parse Substrate actor.ate.dev JWT claim and fail closed on empty ActorUID

* substrate: sync DefaultRunnerEndpoint to ax-server-runner (#631)
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.

2 participants