Skip to content

ate-system now denies ingress by default; in-cluster API clients must label their namespace ate.dev/api-access=true - #2522

Merged
Bowei Du (bowei) merged 1 commit into
agent-substrate:mainfrom
destijl:ate-system-netpol
Oct 13, 2026
Merged

Bowei Du (bowei) merged 1 commit into
agent-substrate:mainfrom
destijl:ate-system-netpol

Conversation

@destijl

@destijl Greg Castle (destijl) commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Add default-deny ingress NetworkPolicies for the ate-system control plane, with allow rules for the flows it needs:

  • ate-api-server :443 from ate-controller, atelet, atenet-router, atenet-egress, and namespaces labeled ate.dev/api-access=true
  • postgres :5432 and atelet gRPC :8085 from ate-api-server only
  • atenet-egress https from worker pods (ate.dev/worker-pool) in any namespace
  • atenet-router data ports (http, https, connect, connect-tls) from any source
  • metrics and health ports from any source (probes, scrapers)
  • kind: rustfs S3 API from ate-api-server, atelet and the bucket-init Job

The router's /statusz port (4040), the rustfs console, and every other port are reachable only through kubectl port-forward.

Breaking change: in-cluster clients of the Substrate API outside ate-system must label their namespace ate.dev/api-access=true. GKE Gateway health checks pointed at the router's status port (4040, /statusz) must move to the metrics port (9090, /readyz). The benchmarking namespace is labeled.

I want to get this in for M3 because all exposed APIs become customer dependencies unless we restrict them.

Fixes #2278

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

@destijl
Greg Castle (destijl) force-pushed the ate-system-netpol branch 2 times, most recently from fc58cbd to 917c689 Compare October 13, 2026 16:59

@bowei Bowei Du (bowei) 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.

LG, some comments on the comments

…ate API with ate.dev/api-access=true

Add default-deny ingress NetworkPolicies for the ate-system control plane,
with allow rules for the flows it needs:

- ate-api-server :443 from ate-controller, atelet, atenet-router,
  atenet-egress, and namespaces labeled ate.dev/api-access=true
- postgres :5432 and atelet gRPC :8085 from ate-api-server only
- atenet-egress https from worker pods (ate.dev/worker-pool) in any namespace
- atenet-router data ports (http, https, connect, connect-tls) from any source
- metrics and health ports from any source (probes, scrapers)
- kind: rustfs S3 API from ate-api-server, atelet and the bucket-init Job

The router's /statusz port (4040), the rustfs console, and every other port
are reachable only through kubectl port-forward.

Breaking change: in-cluster clients of the Substrate API outside ate-system
must label their namespace ate.dev/api-access=true. GKE Gateway health checks
pointed at the router's status port (4040, /statusz) must move to the metrics
port (9090, /readyz). The benchmarking namespace is labeled.

Fixes agent-substrate#2278
@bowei

Copy link
Copy Markdown
Collaborator

Mark comments as resolved when they have been addressed.

@bowei
Bowei Du (bowei) added this pull request to the merge queue Oct 13, 2026
Merged via the queue into agent-substrate:main with commit 792c30c Oct 13, 2026
14 checks passed
@BenTheElder Benjamin Elder (BenTheElder) added the area/security Security related issue/pr label Oct 14, 2026
Haven Xia (HavenXia) pushed a commit to HavenXia/substrate that referenced this pull request Oct 14, 2026
…-system's default-deny ingress (agent-substrate#2637)

Since agent-substrate#2522, ate-system denies ingress by default and admits API clients
only from namespaces labeled `ate.dev/api-access=true`. The
`benchmarking` namespace that the automation's runner Job templates
create had no labels, so on a fresh cluster the runner could not dial
ate-api-server. The boomer worker died ensuring its atespace
(`CreateAtespace ... dial tcp ...:443: i/o timeout`), and the locust
master waited for a worker that never connected until the Job timed out.

This labels the namespace in both runner Job templates
(`runner-job.yaml.tmpl` and `nighthawk-ingress-runner-job.yaml.tmpl`),
as `benchmarking/locust/deploy.sh` already does for manual runs.

`RunnerNamespaceTest` reads the label that the `ate-api-server`
NetworkPolicy selects on and checks both templates against it, so the
two can't drift apart. It fails on both templates without the change.

- [x] Tests pass
- [x] Appropriate changes to documentation are included in the PR (none
needed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/security Security related issue/pr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide default-deny ingress NetworkPolicies for ate-system control plane

3 participants