H-07 Networking
Brick H of the Enterprise AI Platform. Technology: Cilium (CNI, NetworkPolicy, L7 policies, Hubble, WireGuard encryption) + ingress/gateway. French version: ../../fr/bricks/H-07-networking.md.
Role and responsibilities
- Default deny between namespaces, explicit allow per flow, egress allowlist to providers per tenant policy.
Position and interactions
- Execution path: data path.
- global.networkPolicy=cilium renders CiliumNetworkPolicies; egress to external LLM providers only from LiteLLM pods.
Open source and developed parts
- Open source reused: Cilium, Hubble, cert-manager.
- Developed in the platform: Flow matrix and policies in the chart.
Data model
No dedicated table: state lives in Kubernetes objects, Git and the tool's own storage; actions are audited in eai.audit_events through the Control Plane when they go through the API.
Contract: contracts/v1/policy-contract.schema.json (schema_version 1.0). Usage is always reported with contracts/v1/usage-event.schema.json, audit with contracts/v1/audit-event.schema.json.
API endpoints
| Method | Path |
|---|---|
| GET | /readyz |
GET /readyz
Response:
{
"status": "ready",
"checks": {
"postgres": "ok",
"redis": "ok",
"clickhouse": "ok"
}
}
SDK examples
Python
from enterprise_ai import EnterpriseAI
client = EnterpriseAI(base_url="<control-plane-url>", api_key="eai_live_xxx", tenant="acme", locale="en")
client.system.readyz()
TypeScript
import { EnterpriseAI } from "@enterprise-ai/sdk";
const client = new EnterpriseAI({ baseUrl: "<control-plane-url>", apiKey: process.env.EAI_API_KEY, tenant: "acme", locale: "en" });
await client.meta.ready();
Java
EnterpriseAIClient client = EnterpriseAIClient.builder()
.baseUrl("<control-plane-url>")
.apiKey(System.getenv("EAI_API_KEY"))
.tenant("acme")
.locale(Locale.ENGLISH)
.build();
client.meta().ready();
Go
client, err := eai.NewClient(eai.WithBaseURL("<control-plane-url>"), eai.WithAPIKey(os.Getenv("EAI_API_KEY")), eai.WithTenant("acme"), eai.WithLocale("en"))
if err != nil { log.Fatal(err) }
ctx := context.Background()
_, err = client.Meta.Ready(ctx, nil)
Configuration
No EAI_* variable: configured through Helm values and the tool's own configuration.
Helm values keys (deploy/helm/enterprise-ai/values.yaml): global.networkPolicy, global.trustDomain.
Security
- WireGuard node to node encryption, mTLS via SPIFFE identities.
- Tenant resolved from the credential, never from the body; PostgreSQL row level security on every tenant table.
- Every mutation and policy decision writes a hash chained audit event (G-11).
- Errors use the standard envelope with message_i18n en and fr.
Observability
- Hubble flow logs for denied flows.
- W3C traceparent propagated, X-Request-Id returned, spans carry eai.tenant_id, eai.project, eai.agent_id, eai.run_id.
FinOps units
- Egress bytes per namespace recorded for cost allocation.
Failure modes and resilience
- Policy error -> CI connectivity test fails before deploy.
Standalone adoption
Policies are portable to any Cilium cluster.
Acceptance tests
- A sandbox pod cannot reach the database.
- Control plane cannot reach the internet directly.