cub unit blame
cub unit blame
Show what set each field of a unit, when, and why
Synopsis
Show, for every field of a unit's configuration, what set the value that is there: the operation, the revision, who ran it, and the change description they gave it.
Where 'cub unit get -o mutations' shows the mutations grouped by resource and path, this shows the fields, one per line, with the history joined onto each. It is the answer to "who set this, and why" for a value you are looking at.
A value that arrived from upstream is followed to where it was actually set. A field a variant took from its base reads as the base's change, and a field the base took from a rendered chart reads as that chart -- so "did the chart set this, or did we?" is one command rather than three. Pass --no-upstream to report only this unit's own record, which names the upstream unit without reading it.
Columns: PATH the field, in the same path syntax functions and links use VALUE what is there now SET BY the function, external source, link, or trigger that wrote it WHERE the space whose change it was, after following upstream REV that space's revision number WHEN how long ago
A field marked "*" is a protected local override: this unit claims it, and a merge from upstream leaves it alone. A field marked "!" is guarded: reasons are recorded for the value it holds, and an operation has to be cleared for them before it may overwrite it. Use --verbose to see the reasons. A field can be both.
Every toolchain is read: a Kubernetes manifest, and equally an AppConfig JSON, YAML, TOML, INI, Properties, or Env unit, or a ConfigHub one. The unit's data is read in its own format, and array elements are addressed the way that format addresses them -- by merge key where it has them ("?name=server" for a Kubernetes container), by position where it does not.
Use --path to ask about one field, --resource to restrict to one resource, and --verbose to see each change description and the full upstream chain rather than its end. -o json emits one object per field.
Examples:
# Every field of a unit, and what set it.
cub unit blame --space apptique-dev deployment-frontend
# One field: did the chart set this, our base, or this variant?
cub unit blame --space apptique-dev deployment-frontend --path spec.replicas
# Every container image in the unit, with the change descriptions.
cub unit blame --space apptique-dev deployment-frontend --path image --verbose
# This unit's own record, without reading upstream.
cub unit blame --space apptique-dev deployment-frontend --no-upstream
cub unit blame <unit> [flags]
Options
-h, --help help for blame
--no-upstream report this unit's own record without following a merge to where the value was set
-o, --output string Output format. One of: json, yaml, name, wide, mutations, jq=<expr>, yq=<expr>, custom-columns=<spec>
--path string only fields whose path contains this substring
--quiet No default output.
--resource string only fields of this resource, as <type>/<name> or <name>
--select string Comma-separated list of fields to retrieve and display. Entity IDs and Slug are always included. Example: "DisplayName,CreatedAt,Labels"
--show-comments include the comment-carrying pseudo-fields ($comment$...) that hold YAML comments
--upstream-depth int how many upstream units to follow before giving up (default 8)
--verbose Detailed output, additive with default output
Options inherited from parent commands
--context string The context to use for this command
--debug Debug output
--space string space ID to perform command on
SEE ALSO
- cub unit - Unit commands