A Blueprint composes several existing services
into a single new one. Instead of asking platform users to create a PostgresInstance, a
Repository and an App separately and wire them together, a platform engineer authors one
Blueprint, for example a WebappStack, and publishes it to the service catalogue. Users then
create a single object, and KDP creates all the composed objects, called children, for them.
To users, a published Blueprint is just another service. The catalogue marks it with a Blueprint badge.
Blueprints are in beta. The API and user experience may change before general availability.
A Blueprint is a BlueprintDefinition object (blueprints.kdp.k8c.io/v1alpha1, namespaced). Its
core is a kro ResourceGraphDefinition in spec.resourceGraph, which
describes:
spec and status, which users fill in, and${schema.spec.size} that pass values from the user’s
object to the children, and from one child to another.The children must be services that are already published and enabled in the workspace where the Blueprint is authored. Each child is still handled by its own service and service cluster; the services don’t know they are part of a Blueprint.
A BlueprintDefinition moves through these phases:
Draft -> Validating -> Valid | Invalid -> Published -> Deprecated
status.validationErrors.spec.published: true, while Valid) creates an APIResourceSchema, an
APIExport and a Service in the same workspace. The Service is the catalogue entry. The new
kind is served under <kind>.blueprints.kdp.k8c.io.spec.deprecated: true) hides the Blueprint from the catalogue and stops the
dashboard from creating or editing instances. The API doesn’t enforce it, and existing instances
keep working.spec.version is part of the published kind’s identity: raising it publishes a new version.
Setting spec.published back to false stops reconciling instances but doesn’t remove what was
already published.
When a user creates an object of a published Blueprint, KDP creates its children and keeps them in
line with the user’s object. The object’s Ready condition becomes true once all children are
ready; until then, its reason and status.waitingOn show what it is waiting for. Deleting the
object deletes its children.