Skip to content

Commit

Permalink
Merge pull request #4513 from andrewhertog/3798-default-force-false
Browse files Browse the repository at this point in the history
fix: remove the dev override of the force flag
  • Loading branch information
nkubala authored Jul 22, 2020
2 parents 626462e + 4c9394d commit a58e7a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/skaffold/app/cmd/dev_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func TestNewCmdDev(t *testing.T) {
cmd.Execute()

t.CheckDeepEqual(true, opts.Tail)
t.CheckDeepEqual(true, opts.Force)
t.CheckDeepEqual(false, opts.Force)
t.CheckDeepEqual(true, opts.EnableRPC)
})
}
11 changes: 4 additions & 7 deletions cmd/skaffold/app/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,10 @@ var FlagRegistry = []Flag{
DefinedOn: []string{"dev", "run", "debug", "deploy"},
},
{
Name: "force",
Usage: "Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! (true by default for `skaffold dev`)",
Value: &opts.Force,
DefValue: false,
DefValuePerCommand: map[string]interface{}{
"dev": true,
},
Name: "force",
Usage: "Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime!",
Value: &opts.Force,
DefValue: false,
FlagAddMethod: "BoolVar",
DefinedOn: []string{"deploy", "dev", "run", "debug"},
},
Expand Down
8 changes: 4 additions & 4 deletions docs/content/en/docs/references/cli/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Options:
-d, --default-repo='': Default repository value (overrides global config)
--enable-rpc=false: Enable gRPC for exposing Skaffold events (true by default for `skaffold dev`)
-f, --filename='skaffold.yaml': Path or URL to the Skaffold config file
--force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! (true by default for `skaffold dev`)
--force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime!
--insecure-registry=[]: Target registries for built images which are not secure
--kube-context='': Deploy to this Kubernetes context
--kubeconfig='': Path to the kubeconfig file to use for CLI requests.
Expand Down Expand Up @@ -461,7 +461,7 @@ Options:
-d, --default-repo='': Default repository value (overrides global config)
--enable-rpc=false: Enable gRPC for exposing Skaffold events (true by default for `skaffold dev`)
-f, --filename='skaffold.yaml': Path or URL to the Skaffold config file
--force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! (true by default for `skaffold dev`)
--force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime!
-i, --images=: A list of pre-built images to deploy
--kube-context='': Deploy to this Kubernetes context
--kubeconfig='': Path to the kubeconfig file to use for CLI requests.
Expand Down Expand Up @@ -522,7 +522,7 @@ Options:
-d, --default-repo='': Default repository value (overrides global config)
--enable-rpc=false: Enable gRPC for exposing Skaffold events (true by default for `skaffold dev`)
-f, --filename='skaffold.yaml': Path or URL to the Skaffold config file
--force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! (true by default for `skaffold dev`)
--force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime!
--insecure-registry=[]: Target registries for built images which are not secure
--kube-context='': Deploy to this Kubernetes context
--kubeconfig='': Path to the kubeconfig file to use for CLI requests.
Expand Down Expand Up @@ -771,7 +771,7 @@ Options:
-d, --default-repo='': Default repository value (overrides global config)
--enable-rpc=false: Enable gRPC for exposing Skaffold events (true by default for `skaffold dev`)
-f, --filename='skaffold.yaml': Path or URL to the Skaffold config file
--force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime! (true by default for `skaffold dev`)
--force=false: Recreate Kubernetes resources if necessary for deployment, warning: might cause downtime!
--insecure-registry=[]: Target registries for built images which are not secure
--kube-context='': Deploy to this Kubernetes context
--kubeconfig='': Path to the kubeconfig file to use for CLI requests.
Expand Down

0 comments on commit a58e7a0

Please sign in to comment.