Skip to content

Commit

Permalink
fix: do not sync remote configs for specific commands (#6453)
Browse files Browse the repository at this point in the history
* fix: do not sync remote configs for specific commands

* generate-man
  • Loading branch information
gsquared94 committed Aug 23, 2021
1 parent 8303f00 commit a99ffc5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions cmd/skaffold/app/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,15 @@ var flagRegistry = []Flag{
DefinedOn: []string{"all"},
},
{
Name: "sync-remote-cache",
Usage: "Controls how Skaffold manages the remote config cache (see `remote-cache-dir`). One of `always` (default), `missing`, or `never`. `always` syncs remote repositories to latest on access. `missing` only clones remote repositories if they do not exist locally. `never` means the user takes responsibility for updating remote repositories.",
Value: &opts.SyncRemoteCache,
DefValue: "always",
Name: "sync-remote-cache",
Usage: "Controls how Skaffold manages the remote config cache (see `remote-cache-dir`). One of `always` (default), `missing`, or `never`. `always` syncs remote repositories to latest on access. `missing` only clones remote repositories if they do not exist locally. `never` means the user takes responsibility for updating remote repositories.",
Value: &opts.SyncRemoteCache,
DefValue: "always",
DefValuePerCommand: map[string]interface{}{
"inspect": "missing",
"diagnose": "missing",
"fix": "missing",
},
FlagAddMethod: "Var",
DefinedOn: []string{"all"},
},
Expand Down
4 changes: 2 additions & 2 deletions docs/content/en/docs/references/cli/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ Options:
--profile-auto-activation=true: Set to false to disable profile auto activation
--propagate-profiles=true: Setting '--propagate-profiles=false' disables propagating profiles set by the '--profile' flag across config dependencies. This mean that only profiles defined directly in the target 'skaffold.yaml' file are activated.
--remote-cache-dir='': Specify the location of the git repositories cache (default $HOME/.skaffold/repos)
--sync-remote-cache='always': Controls how Skaffold manages the remote config cache (see `remote-cache-dir`). One of `always` (default), `missing`, or `never`. `always` syncs remote repositories to latest on access. `missing` only clones remote repositories if they do not exist locally. `never` means the user takes responsibility for updating remote repositories.
--sync-remote-cache='missing': Controls how Skaffold manages the remote config cache (see `remote-cache-dir`). One of `always` (default), `missing`, or `never`. `always` syncs remote repositories to latest on access. `missing` only clones remote repositories if they do not exist locally. `never` means the user takes responsibility for updating remote repositories.
--yaml-only=false: Only prints the effective skaffold.yaml configuration
Usage:
Expand Down Expand Up @@ -801,7 +801,7 @@ Options:
-m, --module=[]: Filter Skaffold configs to only the provided named modules
--overwrite=false: Overwrite original config with fixed config
--remote-cache-dir='': Specify the location of the git repositories cache (default $HOME/.skaffold/repos)
--sync-remote-cache='always': Controls how Skaffold manages the remote config cache (see `remote-cache-dir`). One of `always` (default), `missing`, or `never`. `always` syncs remote repositories to latest on access. `missing` only clones remote repositories if they do not exist locally. `never` means the user takes responsibility for updating remote repositories.
--sync-remote-cache='missing': Controls how Skaffold manages the remote config cache (see `remote-cache-dir`). One of `always` (default), `missing`, or `never`. `always` syncs remote repositories to latest on access. `missing` only clones remote repositories if they do not exist locally. `never` means the user takes responsibility for updating remote repositories.
--version='skaffold/v2beta22': Target schema version to upgrade to
Usage:
Expand Down

0 comments on commit a99ffc5

Please sign in to comment.