Skip to main content
Version: 1.3

wf sync

wf sync​

Adds, updates and removes resources to bring them in sync with the set of files supplied

Synopsis​

EXPERIMENTAL

The sync command provides a means to manage all resources (apply and remove) from a source location.

This is intended to be used in a standard git workflow, where --dry-run can be used to examine the changes which would be made (for example, in a pull request test) before applying them on a merge.

wf sync [flags]

Examples​


# Read the resources from one or more directories and apply
$ wf sync -f <dir> -f <file> --state <configmap>

# Read the resources from stdin
$ cat|kustomize <file> | wf sync -f - --state <configmap>

# Perform a dry-run and show the diff between the expected and current
$ wf sync -f <dir> -f <file> --state <configmap> --dry-run

Options​

      --dry-run           perform a diff only on the current state
-f, --file PATH path to file containing resource definition/s ('-' for stdin) PATH
-h, --help help for sync
--non-interactive indicates we do not prompt for deletions
--state string name of the configmap to use to hold current state

Options inherited from parent commands​

      --debug              Indicates we should use debug / trace logging (default: false)
--force Used to force an operation to happen (default: false)
--no-wait Indicates we should not wait for resources to provision
-o, --output string Output format of the resource (json,yaml,table,template) (default "table")
--profile string Use a profile other than your default for this command
--show-headers Indicates we should display headers on table out (default true)
--verbose Enables verbose logging for debugging purposes (default: false)
-w, --workspace string The workspace you are operating within

SEE ALSO​

  • wf - wf provides a cli for Wayfinder