Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove the dev override of the force flag #4513

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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