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
- Load
tazuna.yaml. - For each Manifest, call Build and compute the difference against State.
- Reflect resources classified as
added/modified/always-syncinto the cluster. - Resources classified as
removedare skipped by default. They are deleted only whenTAZUNA_STATE_SYNC_DELETE=trueis set. - 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.
| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--atomic | - | bool | false | If an error occurs, exit without updating State. |
Environment Variables
| Environment Variables | Value | Description |
|---|---|---|
TAZUNA_STATE_SYNC_DELETE | true | Delete 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
Related
- View differences:
tazuna state diff - Terminology: Diff type / always-sync