Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

tazuna state sync

Compares the Build result of each Manager with State, and reflects only the added or modified resources into the cluster. The State of successfully synchronized resources is written back to the ConfigMap.

tazuna state sync [-f tazuna.yaml] [--atomic]

Behavior

  1. Load tazuna.yaml.
  2. For each Manifest, call Build and compute the difference against State.
  3. Reflect resources classified as added / modified / always-sync into the cluster.
  4. Resources classified as removed are skipped by default. They are deleted only when TAZUNA_STATE_SYNC_DELETE=true is set.
  5. Write back the State of successfully synchronized resources.

When --atomic is specified, if any resource errors out, the command exits without updating State at all (the in-progress apply itself is not rolled back).

Does not evaluate context_matches.

Flag

In addition to global flags, the following are accepted.

FlagAliasTypeDefaultDescription
--atomic-boolfalseIf an error occurs, exit without updating State.

Environment Variables

Environment VariablesValueDescription
TAZUNA_STATE_SYNC_DELETEtrueDelete resources classified as removed. When not set, deletion does not happen.

Examples

tazuna state sync
tazuna state sync -f tazuna.yaml
tazuna state sync --atomic
TAZUNA_STATE_SYNC_DELETE=true tazuna state sync