A cell is the cattle pen: a placement-and-grouping unit over entities of one EntityType. Cells carry a placement policy (how to rank members when recommending where a new tenant should land) and fleet-wide capacity constraints. Phase: schema.
A cell's members are entities of its entityType — for example, a
prod-clusters cell whose members are TenantCluster entities. When an
Action declares a recommendation against a
cell, Terrantula ranks the members by the cell's policy and proposes the best
target.
| Field | Type | Required | Description |
|---|---|---|---|
kind | "Cell" | yes | Discriminator. Always Cell. |
name | string | yes | Unique cell name within the project. Referenced by Action recommendations. |
displayName | string | no | Human label for the UI. Defaults to name. |
entityType | string | yes | Name of the EntityType whose instances are this cell's members. Must reference an existing EntityType. |
placementPolicy | "least-loaded" | "round-robin" | "random" | no | How to rank members when generating placement recommendations. Default least-loaded. |
constraints | CellConstraint[] | no | Fleet-wide capacity ceilings across all members. Default []. |
parentCells | string[] | no | Names of parent cells, for nested grouping. Default []. |
membership | Membership | no | How members are determined. Omitted = explicit (membership rows). When present, membership is derived from each member's property value. |
A ceiling on an aggregate of a member metric across the whole cell.
| Field | Type | Required | Description |
|---|---|---|---|
metric | string | yes | Name of a metric declared on the cell's entityType. |
aggregate | "sum" | "avg" | "min" | "max" | yes | How to combine the metric across all members. |
max | number | yes | Ceiling for the aggregated value. |
Derived-membership rule. When membership.derivedFrom is present, the cell
computes its members from a member entity's property value rather than from
explicit membership rows.
| Field | Type | Required | Description |
|---|---|---|---|
derivedFrom.property | string | yes | Property of the cell's entityType to match on. Validated at apply. |
derivedFrom.value | string | no | Value the property must equal for membership. Defaults to the cell's name. |
The prod-clusters cell from the SaaS-tenants demo. Members are
TenantCluster entities; placement uses least-loaded ranking by tenant-count;
a fleet-wide cap of 500 tenants is enforced across the whole cell.
A derived-membership cell — clusters whose region property equals
us-east-1 are automatically members, no membership rows required:
entityType must reference an existing EntityType. Because applyruns the
schema phase in dependency order, you can declare the EntityType and the Cell in
the same blueprint and the reference resolves.
A cell constraint is a fleet-wide aggregate ceiling (e.g. "500 tenants across
all clusters"). The per-entity ceiling (e.g. "50 tenants per cluster") lives on
the EntityType's constraintsinstead.
Membership comes in two flavors. Explicit (the default) reads membership rows — the UI may add/remove members directly because cell membership is Terrantula-owned intent. Derived computes membership from a property value; to change a derived cell's membership you change the entity property, which flows through an Actionand a pull request.
A legacy /pools route 308-redirects to /cells. "Pool" was the previous name;
the field and route are now celleverywhere.
recommendations[].cell ranks members for placement.