Skip to Content
AgentShield
Architecture

Deployment Architecture

How AgentShield is packaged and deployed. Hardened containers, Docker Compose profiles, Kubernetes overlays, network policy, and signed releases.

AgentShield ships as five container images and two deployment descriptions: Docker Compose for workstations and CI, and Kustomize manifests for Kubernetes.

Images

ImageBuilt fromBaseHealth check
gatewayruntime/gateway/Dockerfile (target gateway)distroless/static-debian12:nonrootgateway healthcheck
event-relayruntime/gateway/Dockerfile (target event-relay)distroless/static-debian12:nonrootevent-relay healthcheck
control-planeapps/control-plane/Dockerfilenode:22-alpine, user nodeContainer HEALTHCHECK
dashboardapps/dashboard/Dockerfilenode:22-alpine, user nodeContainer HEALTHCHECK
intelligenceapps/intelligence-engine/Dockerfilepython:3.12-slim, UID 10001Container HEALTHCHECK

Every image is multi-stage, uses digest-pinned bases, and runs as a non-root user. Go images are about 22 MB.

Docker Compose

CommandStarts
docker compose up -dData services only, for running applications from source
docker compose --profile app up -d --buildData services and all five applications
… --profile app --profile observability up -d --buildAlso Prometheus and Grafana

Every published port binds to 127.0.0.1. Application containers run with read_only: true, no-new-privileges, and cap_drop: ALL. See Docker Compose.

Kubernetes

Network policy, as defined in the base:

ServiceMay acceptMay open
GatewayAgents on 8081PostgreSQL, Redis, the analyzer, public HTTPS (private and link-local ranges excluded)
IntelligenceThe gateway onlyNothing
Control planeThe dashboard onlyPostgreSQL, object storage, SMTP
DashboardUsers on 3000 (the ingress controller in production)The control plane
Event relayMetrics scrapes onlyPostgreSQL, NATS, object storage

Every other path is denied. Metrics ports additionally accept pods labelled agentshield.io/metrics-scraper: "true".

The base enforces:

  • Pod Security. The agentshield namespace enforces the restricted Pod Security Standard: non-root, seccomp RuntimeDefault, no privilege escalation, all capabilities dropped, read-only root filesystem, and no service account token.
  • Default-deny networking in both directions, then per-service allowances. The analyzer accepts only the gateway and opens no connections. In the production overlay it runs as a sidecar in the gateway pod, on loopback, so it is unreachable from outside the pod. The gateway's outbound HTTPS excludes private, loopback, carrier-grade NAT, and link-local ranges, repeating the http.request adapter's SSRF checks at the network layer.
  • The app role everywhere. Every service connects as agentshield_app, even in the dev overlay. Only the bootstrap Job uses the schema owner.
OverlayPurpose
base/Services, configuration, network policies
overlays/dev/Whole stack on a local cluster with in-cluster data stores
overlays/production/Published images, two replicas, disruption budgets, ingress, analyzer as a loopback sidecar of the gateway

NetworkPolicy takes effect only with a network plugin that enforces it. See Kubernetes.

Signed releases

.github/workflows/release.yml runs only on a v*.*.* tag or by hand. It builds each image for amd64 and arm64, attaches an SBOM and maximal build provenance, pushes to ghcr.io/<owner>/agentshield-<service>, and signs the digest with cosign keyless signing bound to the repository's release workflow through GitHub OIDC. No signing key exists to leak, and every third-party action is pinned to a commit.

Continuous integration

CI builds every image, starts the Compose stack, waits for readiness, verifies non-root users and read-only filesystems, bootstraps an owner and signs in, checks that Prometheus scrapes every service, and deploys the dev overlay to a kind cluster, where it verifies that the analyzer refuses everything except the gateway.

Was this page helpful?

On this page