Architecture Overview for Workload Map
Workload Map is designed around a thin, neutral contract. The structure of a workload is described once, in a definition, and every tool reads the same description. The tools do not need to know how each workload type lays out its pods, replicas, and status.
Workload Map is a set of independent components that share the Go library. A definition, stored in the Karta CRD or in the built-in catalog, describes a workload type. The library reads a definition and a workload object and produces a uniform struct. The CLI, the Karta Operator, the Headlamp plugin, and your own controllers consume that struct or validate the definitions behind it.
The following diagram shows the layers:
Components
The following table lists the components of Workload Map.
Every component sits on top of the library. The CLI uses the library directly, and the Headlamp plugin uses it through the WebAssembly engine. The Karta Operator uses the library to validate the definitions that it reconciles. The built-in catalog is part of the library and is used by the CLI.
The Karta Operator manages definitions only. The CLI and the library do not require the Karta Operator, because the CLI reads definitions from its built-in catalog and from the cluster.
Data Flow
A workload and its definition become a struct in the following sequence.
- Select the definition that covers the workload type. A definition in the cluster overrides the built-in catalog definition for the same workload type.
- Read the workload object and its pods from the cluster, or read a manifest that you have not yet submitted.
- Evaluate the path expressions in the definition to extract the components, instances, scale, and status.
- Build the workload tree. Pods are attributed to the component whose role they play, by ownership and by the pod selectors in the definition.
- Render or act on the tree. The CLI and the Headlamp plugin render it, a scheduler reads the gang scheduling instructions, and a controller updates the pod specs.
Deployment Topologies
The following table shows where each part of Workload Map runs.