The team stands behind this decision.
Reconstructed after the decision was made. Check it against its sources.
- docs/docs/architecture/overview.md#layer-architecture
- docs/docs/architecture/overview.md#domain-interaction-model
- docs/static/img/highlevel-architecture.svg
- docs/docs/overview/components.md
- docs/docs/architecture/api.mdx
- docs/docs/architecture/event.mdx
- docs/docs/architecture/file.mdx
- docs/docs/architecture/agentic.mdx
- docs/docs/architecture/pubsub.mdx
- docs/docs/architecture/spectre.mdx
- docs/docs/architecture/controlplane-api.mdx
- discovery-server/internal/server/deprecated.go
- controlplane-api/cmd/main.go
- controlplane-api/internal/service/services_k8s.go
- projector/internal/infrastructure/idresolver.go
- https://github.com/telekom/controlplane/pull/344
- .github/ci/module-graph.json
- https://github.com/telekom/controlplane/pull/306
Layers see only the API module of the layer below
Context
A customer describes what they want in a Rover file: APIs to expose, subscriptions, events, files. In the end, that wish has to become concrete settings on the components that carry the traffic, such as the API gateway, the identity provider and the event backbone. In between, the platform has to check the request, run approvals and resolve how the pieces depend on each other. Alongside, user interfaces need to see the resulting platform state.
Decision
The Control Plane splits this path into three layers, and a request always moves through them in the same order. A fourth layer serves user interfaces beside them, and a few services are shared by all.
- Customer-Config layer. The entry point for customers: the Rover file, Rover Server and Rover-CTL. It receives what the customer submits and does most of the validation, so that only well-formed requests travel further.
- Logic layer. The business rules: applications, organizations and permissions, API, event and file exposures and subscriptions, MCP servers, listeners, and approvals. It decides what the customer may get and resolves dependencies between domains.
- Runtime-Config layer. Turns the result into settings on the actual components: gateway routes and consumers, identity clients, publish and subscribe configuration, SFTP access.
Each layer hands over by creating resources that the next layer processes. A layer only sees the API module of the layer directly below it. It never skips a layer, never reaches into another domain's internals, and never looks upward. Domains within the same layer also talk to each other only through their API modules.
The UI layer, made up of the ControlPlane API, the Projector and the Discovery Server, sits next to the Customer-Config layer and follows the same rule: it sees only the Logic layer's API modules. No other layer depends on it, so the UI cannot leak into the business rules.
- Projector. Copies the state of the Logic layer's resources into a database. It never changes anything in the cluster.
- ControlPlane API. Serves that database to user interfaces. It also lets them change teams, groups, applications and approvals. Like the Customer-Config layer, it does so only by writing resources through the Logic layer's API modules.
- Discovery Server. Only reads.
The Projector and the ControlPlane API are the one exception to the same-layer rule. They share the database types that ent generates in the ControlPlane API module. Those types are their interface: the Projector writes them into the database, and the ControlPlane API reads them.
Administration, notifications and secret management sit outside the chain. They are shared by all domains in every layer.
Options considered
- Three layers, each seeing only the next layer's API module (chosen): keeps the system modular, maintainable and easy to extend, and does most of the checking of customer input at the entry point.
No alternatives were evaluated. The layering was the initial design, and the team went with it.