Adapters
On this page
Moorhold works with each tool through an adapter: a small piece of Moorhold that knows that one tool's API. Everything else in Moorhold, the store, the reconciler and the portal, works the same for every tool. This page explains what adapters do, and what each one manages in the latest release (2026.11.4).
What an adapter does
Section titled "What an adapter does"When the reconciler works on a resource, it asks each adapter that resource concerns to:
- Observe what its tool holds for the resource.
- Plan what to change. Planning only reads what was observed, so it has no effect on the tool. That's how a plan can be shown before anything happens.
- Apply each step of the plan. This is the only part that talks to the tool.
An adapter keeps track of what it made. Where a tool can label an object, the label marks it as Moorhold's. Where it can't, the adapter records the object's id and a fingerprint of its settings in the resource's status. That's how it tells its own objects from yours, repairs drift in its own, and leaves yours alone.
Four contracts
Section titled "Four contracts"An adapter can take part in four ways. Each tool takes part in the ones it supports.
| Contract | What it covers |
|---|---|
| Provisioning | Creating, changing and removing what a resource asks for in the tool. |
| Identity | How people sign in to the tool, and the roles each group gets there. |
| Lineage | Reporting where the tool's data came from. |
| Agents | Whether the tool has an MCP server of its own that agents can use with a person's token. |
For identity, a tool either reads Keycloak's groups itself (native), has Moorhold keep its own roles in line with them (projection), or sits behind OAuth2 Proxy because it has no sign-in of its own that Moorhold can use (gateway).
The adapters
Section titled "The adapters"On every installed server
Section titled "On every installed server"| Tool | What its adapter manages |
|---|---|
| Keycloak | The realm's clients, the portal's sign-in, and each person's groups. The other adapters read groups from it. |
| Trino | A catalog for each Postgres database source, created by Moorhold's own account. For a web service, a schema in the warehouse catalog. Trino can't report a catalog's settings, so the adapter keeps a fingerprint of them, and a changed fingerprint means the catalog is dropped and created again. |
| Apache Superset | One database, reaching your data through Trino, never through the source itself, and a dataset for each table you use. Only datasets Moorhold created are ever deleted. |
| DataHub | A secret holding the catalog login's password, an ingestion source, and the first run, which waits until the first listed table is catalogued. A soft delete keeps catalogued datasets and their lineage. A hard delete removes only the datasets Moorhold recorded as its own. A table already in DataHub when first listed is someone else's and is never deleted. |
| Apache Airflow | A connection for each database source, and the DAG files that load each source, named moorhold_<source>__<kind>. Each DAG file carries a header saying Moorhold owns it, and a hash, so a file changed by hand is noticed. A soft delete keeps removed DAGs' run history. A hard delete purges it. |
The core profile has no Superset or DataHub, so their adapters don't run there.
Tools a Stack can add
Section titled "Tools a Stack can add"| Tool | What its adapter manages |
|---|---|
| SeaweedFS | Object storage on the server: a bucket for each Iceberg catalog, named lake- and then the catalog's name, and an account for each tool that reads it. Moorhold never deletes data. A bucket that still holds objects stops a teardown until it's emptied. |
| Apache Polaris | An Iceberg catalog for each IcebergCatalog resource, with two catalog roles, moorhold_reader and moorhold_writer, given to the groups the RoleProjection maps to those levels, and to the tools that use the catalog. Teardown removes an empty catalog; one that holds namespaces is left, because the data is never deleted. |
| Kestra | A second orchestrator, kept as a reference. A source becomes values in a Kestra namespace and, if the source names a flow, a managed flow. People reach Kestra through OAuth2 Proxy. Its single sign-on, roles and lineage are in its paid edition only, so Airflow is the default. |
SeaweedFS and Polaris are opt-in: the installed Stack doesn't include them. Kestra isn't a default. The profiles and components reference lists their versions and ratings.
Why adapters
Section titled "Why adapters"Keeping each tool's details in one adapter means a tool can be replaced by another that fills the same role, and the rest of Moorhold doesn't change. The Stack names a tool for each role, and the adapter for that tool does the work. It also means a tool's oddities, such as Trino not reporting its catalogs' settings, are handled in one place, with tests that don't need the tool running.