control-plane

module
v0.0.0-...-e4374fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0

README

control-plane

Monorepo for the DCM control plane monolith.

Layout

cmd/control-plane/              # monolith entrypoint
internal/app/                   # wiring, config, shared DB bootstrap
internal/catalog/               # catalog manager
internal/placement/             # placement manager
internal/policy/                # policy manager (CRUD + OPA engine)
internal/sp/                    # service provider manager
api/                            # OpenAPI specs per domain
pkg/                            # generated HTTP clients
test/subsystem/                 # per-domain subsystem tests
deploy/                         # platform compose, helm chart, postgres init

See the control plane monolith enhancement.

Development

Build and unit tests:

make build
make test
make lint
make check-catalog-aep

Run the monolith (pick one):

Command Where it runs Database Other deps
make run host SQLite at /tmp/control-plane.db NATS disabled
make run-dev host Postgres (DB_* defaults) Postgres + NATS running locally
make compose-up containers Postgres in compose also starts NATS, control-plane, and dcm-ui
make run              # SQLite, no containers
make compose-up       # platform stack in containers
make compose-down     # stop stack and remove volumes

Compose uses POSTGRES_USER and POSTGRES_PASSWORD (defaults in compose are for local dev only). Override via environment or a .env file; see deploy/.env.example.

Policy evaluation and placement provisioning run in-process in the monolith (EvaluationService, PlacementService via local clients). There is no public HTTP route for policies:evaluateRequest or /resources. Use make test-policy and make test-placement for unit coverage.

Per-domain subsystem tests still run separately; catalog compose may set PLACEMENT_MANAGER_URL to reach WireMock placement stubs (test-only; not a production API on the monolith).

Legacy cmd/*-manager binaries were removed. Use make build / make run.

Container image

Build locally:

make image-build

CI pushes to quay.io/dcm-project/control-plane on merges to main and release/v* branches (and on version tags). See Releasing in shared-workflows for tag behavior and version conventions.

Platform deploy

Full-stack Compose and Helm packaging live under deploy/:

  • Compose: control-plane, postgres, nats, dcm-ui, and optional service providers
  • Helm: Kubernetes/OpenShift chart at deploy/helm/dcm

See deploy/RUN.md for local stack usage and service provider profiles. See deploy/helm/dcm/README.md for cluster installs.

The control-plane API is exposed on :8080.

Image versions

Service repos push images to quay.io/dcm-project/<service> with the following tags:

Tag format Example When created
main main Every push to main
<short-sha> a6882f7 Every push to main or release/v* branch, and v* git tag pushes
v<semver>-rc.N v0.0.1-rc.2 Retag script (promotes a release branch SHA to an RC tag)
v<semver> v0.0.1 When a v* git tag is pushed (final release)

Browse available tags at https://quay.io/repository/dcm-project/<service>?tab=tags.

Pin versions in .env (see deploy/.env.example):

CONTROL_PLANE_VERSION=v0.0.1

Omitting the variable defaults to main.

Directories

Path Synopsis
api
catalog/v1alpha1
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
catalog/v1alpha1/servicetypes
Package servicetypes provides primitives to interact with the openapi HTTP API.
Package servicetypes provides primitives to interact with the openapi HTTP API.
catalog/v1alpha1/servicetypes/cluster
Package cluster provides primitives to interact with the openapi HTTP API.
Package cluster provides primitives to interact with the openapi HTTP API.
catalog/v1alpha1/servicetypes/container
Package container provides primitives to interact with the openapi HTTP API.
Package container provides primitives to interact with the openapi HTTP API.
catalog/v1alpha1/servicetypes/database
Package database provides primitives to interact with the openapi HTTP API.
Package database provides primitives to interact with the openapi HTTP API.
catalog/v1alpha1/servicetypes/three_tier_app_demo
Package three_tier_app_demo provides primitives to interact with the openapi HTTP API.
Package three_tier_app_demo provides primitives to interact with the openapi HTTP API.
catalog/v1alpha1/servicetypes/vm
Package vm provides primitives to interact with the openapi HTTP API.
Package vm provides primitives to interact with the openapi HTTP API.
policy/v1alpha1
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
Package v1alpha1 provides primitives to interact with the openapi HTTP API.
sp/v1alpha1/provider
Package provider provides primitives to interact with the openapi HTTP API.
Package provider provides primitives to interact with the openapi HTTP API.
sp/v1alpha1/resource_manager
Package resource_manager provides primitives to interact with the openapi HTTP API.
Package resource_manager provides primitives to interact with the openapi HTTP API.
cmd
control-plane command
internal
app
Package app wires the control-plane monolith.
Package app wires the control-plane monolith.
catalog/api/server
Package server provides primitives to interact with the openapi HTTP API.
Package server provides primitives to interact with the openapi HTTP API.
catalog/config
Package config provides application configuration loaded from environment variables.
Package config provides application configuration loaded from environment variables.
catalog/handlers/v1alpha1
Package v1alpha1 implements the v1alpha1 API request handlers.
Package v1alpha1 implements the v1alpha1 API request handlers.
catalog/logging
Package logging provides HTTP logging middleware using slog.
Package logging provides HTTP logging middleware using slog.
catalog/placement
Package placement provides a client for the Placement Manager service.
Package placement provides a client for the Placement Manager service.
catalog/service
Package service implements the business logic for catalog management.
Package service implements the business logic for catalog management.
catalog/store
Package store provides database access for catalog resources.
Package store provides database access for catalog resources.
catalog/store/model
Package model defines the database models for catalog resources.
Package model defines the database models for catalog resources.
placement/config
Package config handles loading and validating service configuration.
Package config handles loading and validating service configuration.
placement/httputil
Package httputil provides HTTP utility functions including retry logic.
Package httputil provides HTTP utility functions including retry logic.
placement/logging
Package logging provides structured logging initialization for the application.
Package logging provides structured logging initialization for the application.
placement/policy
Package policy provides types and an adapter boundary for policy evaluation.
Package policy provides types and an adapter boundary for policy evaluation.
placement/service
Package service implements the core business logic for resource placement.
Package service implements the core business logic for resource placement.
placement/sprm
Package sprm provides types and an adapter boundary for SP resource instances.
Package sprm provides types and an adapter boundary for SP resource instances.
placement/store
Package store provides data persistence operations for resources.
Package store provides data persistence operations for resources.
placement/store/model
Package model defines the database models for resource storage.
Package model defines the database models for resource storage.
placement/types
Package types holds domain models for placement resources.
Package types holds domain models for placement resources.
policy/api/server
Package server provides primitives to interact with the openapi HTTP API.
Package server provides primitives to interact with the openapi HTTP API.
policy/config
Package config provides application configuration loaded from environment variables.
Package config provides application configuration loaded from environment variables.
policy/handlers/v1alpha1
Package v1alpha1 handles v1alpha1 API requests for policy CRUD operations.
Package v1alpha1 handles v1alpha1 API requests for policy CRUD operations.
policy/logging
Package logging provides structured logging initialization for the application.
Package logging provides structured logging initialization for the application.
policy/opa
Package opa provides an embedded OPA engine for policy compilation and evaluation.
Package opa provides an embedded OPA engine for policy compilation and evaluation.
policy/service
Package service implements the business logic for policy operations.
Package service implements the business logic for policy operations.
policy/store
Package store provides database initialization and storage interfaces for policies.
Package store provides database initialization and storage interfaces for policies.
policy/store/model
Package model defines the database models for the store layer.
Package model defines the database models for the store layer.
sp/api/provider
Package provider provides primitives to interact with the openapi HTTP API.
Package provider provides primitives to interact with the openapi HTTP API.
sp/api/resource_manager
Package resource_manager provides primitives to interact with the openapi HTTP API.
Package resource_manager provides primitives to interact with the openapi HTTP API.
sp/cleanup
Package cleanup implements a scheduler for deferred deletions of service type instances.
Package cleanup implements a scheduler for deferred deletions of service type instances.
sp/config
Package config handles loading and validating service configuration.
Package config handles loading and validating service configuration.
sp/consumer
Package consumer subscribes to NATS JetStream status events.
Package consumer subscribes to NATS JetStream status events.
sp/handlers/provider
Package provider implements HTTP handlers for the Provider API.
Package provider implements HTTP handlers for the Provider API.
sp/handlers/resource_manager
Package resource_manager implements HTTP handlers for the Resource Manager API.
Package resource_manager implements HTTP handlers for the Resource Manager API.
sp/healthcheck
Package healthcheck performs periodic health checks on registered service providers.
Package healthcheck performs periodic health checks on registered service providers.
sp/logging
Package logging provides structured logging initialization for the application.
Package logging provides structured logging initialization for the application.
sp/service
Package service provides shared types and helpers for business logic layers.
Package service provides shared types and helpers for business logic layers.
sp/service/provider
Package provider implements business logic for provider management.
Package provider implements business logic for provider management.
sp/service/resource_manager
Package resource_manager implements business logic for service type instance management.
Package resource_manager implements business logic for service type instance management.
sp/store
Package store provides database access interfaces and implementations.
Package store provides database access interfaces and implementations.
sp/store/model
Package model defines database models used by the store layer.
Package model defines database models used by the store layer.
sp/store/provider
Package provider provides database access for provider operations.
Package provider provides database access for provider operations.
sp/store/resource_manager
Package store provides database access for service type instance operations.
Package store provides database access for service type instance operations.
sp/testutil
Package testutil provides helpers shared by tests in this module.
Package testutil provides helpers shared by tests in this module.
pkg
catalog/client
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.
policy/client
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.
sp/client/provider
Package provider provides primitives to interact with the openapi HTTP API.
Package provider provides primitives to interact with the openapi HTTP API.
sp/client/resource_manager
Package resource_manager provides primitives to interact with the openapi HTTP API.
Package resource_manager provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL