diff --git a/cmd/skaffold/app/cmd/dev_test.go b/cmd/skaffold/app/cmd/dev_test.go index f70f66e04e4..b163702561a 100644 --- a/cmd/skaffold/app/cmd/dev_test.go +++ b/cmd/skaffold/app/cmd/dev_test.go @@ -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) }) } diff --git a/cmd/skaffold/app/cmd/flags.go b/cmd/skaffold/app/cmd/flags.go index c062ee8cbfd..3918036c419 100644 --- a/cmd/skaffold/app/cmd/flags.go +++ b/cmd/skaffold/app/cmd/flags.go @@ -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"}, }, diff --git a/docs/content/en/docs/references/cli/_index.md b/docs/content/en/docs/references/cli/_index.md index 99e20c939d7..a797b542801 100644 --- a/docs/content/en/docs/references/cli/_index.md +++ b/docs/content/en/docs/references/cli/_index.md @@ -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. @@ -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. @@ -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. @@ -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.