Catalog of Definitions
The catalog contains the pre-built, tested definitions that ship with Workload Map. The Go library and kli include the catalog, so they can read these workload types even when the cluster has no definition for them. This page explains how the catalog works and lists its definitions.
How the Catalog Works
- The definitions are Go code in
pkg/catalog. The repository generates them into YAML files in thedocs/catalog/directory. - The name of a definition follows the group, version, and kind of the workload, such as
leaderworkerset-x-k8s-io-leaderworkerset-v1. The file has the same name with the.yamlextension. - A definition in the cluster overrides the catalog definition for the same group, version, and kind.
klilists such a definition once, with the origincluster. - A definition marked
spec.experimental: trueis excluded by default. For more information, refer to Inspect Workloads with the CLI.
To list the definitions in the catalog, run the following command:
To print one definition, give its name. The YAML output applies and validates as it is:
To write your own definition, start from the catalog definition that is closest to your workload type. For more information, refer to Define a Workload Type.
Definitions in the Catalog
Each name in the following table links to the definition file in the repository. The components are the components of the definition, from the root component down.
Experimental Definitions
The following definition is experimental. It is excluded from kli and the Headlamp plugin until you enable experimental definitions in each tool.
To include it in kli, use the --catalog-experimental-definitions option. For the Headlamp plugin, refer to Include Experimental Definitions.
Next Steps
- To write a definition for a workload type that is not in the catalog, refer to Define a Workload Type.
- To look up the fields of a definition, refer to the Workload Definition Spec.