Skip to content

Commit

Permalink
adding -y to various commands that use --yes. kops create,
Browse files Browse the repository at this point in the history
rolling-update and update now include -y.
  • Loading branch information
chrislovecnm committed Nov 6, 2017
1 parent df69d04 commit a25b5d7
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/kops/create_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command {
},
}

cmd.Flags().BoolVar(&options.Yes, "yes", options.Yes, "Specify --yes to immediately create the cluster")
cmd.Flags().BoolVarP(&options.Yes, "yes", "y", options.Yes, "Specify --yes to immediately create the cluster")
cmd.Flags().StringVar(&options.Target, "target", options.Target, fmt.Sprintf("Valid targets: %s, %s, %s. Set this flag to %s if you want kops to generate terraform", cloudup.TargetDirect, cloudup.TargetTerraform, cloudup.TargetDirect, cloudup.TargetTerraform))
cmd.Flags().StringVar(&options.Models, "model", options.Models, "Models to apply (separate multiple models with commas)")

Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/rollingupdatecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func NewCmdRollingUpdateCluster(f *util.Factory, out io.Writer) *cobra.Command {
Example: rollingupdate_example,
}

cmd.Flags().BoolVar(&options.Yes, "yes", options.Yes, "perform rolling update without confirmation")
cmd.Flags().BoolVarP(&options.Yes, "yes", "y", options.Yes, "Perform rolling update immediately, without --yes rolling-update executes a dry-run")
cmd.Flags().BoolVar(&options.Force, "force", options.Force, "Force rolling update, even if no changes")
cmd.Flags().BoolVar(&options.CloudOnly, "cloudonly", options.CloudOnly, "Perform rolling update without confirming progress with k8s")

Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/update_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func NewCmdUpdateCluster(f *util.Factory, out io.Writer) *cobra.Command {
},
}

cmd.Flags().BoolVar(&options.Yes, "yes", options.Yes, "Actually create cloud resources")
cmd.Flags().BoolVarP(&options.Yes, "yes", "y", options.Yes, "Create cloud resources, without --yes update is in dry run mode")
cmd.Flags().StringVar(&options.Target, "target", options.Target, "Target - direct, terraform, cloudformation")
cmd.Flags().StringVar(&options.Models, "model", options.Models, "Models to apply (separate multiple models with commas)")
cmd.Flags().StringVar(&options.SSHPublicKey, "ssh-public-key", options.SSHPublicKey, "SSH public key to use (deprecated: use kops create secret instead)")
Expand Down
2 changes: 1 addition & 1 deletion cmd/kops/update_federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (

update_federation_example = templates.Examples(i18n.T(`
# After cluster has been edited or upgraded, configure it with:
kops update federation k8s-cluster.example.com --yes --state=s3://kops-state-1234 --yes
kops update federation k8s-cluster.example.com --state=s3://kops-state-1234
`))

update_federation_short = i18n.T("Update federation cluster resources.")
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_create_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ kops create cluster
--target string Valid targets: direct, terraform, direct. Set this flag to terraform if you want kops to generate terraform (default "direct")
-t, --topology string Controls network topology for the cluster. public|private. Default is 'public'. (default "public")
--vpc string Set to use a shared VPC
--yes Specify --yes to immediately create the cluster
-y, --yes Specify --yes to immediately create the cluster
--zones stringSlice Zones in which to run the cluster
```

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_rolling-update_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ kops rolling-update cluster
--instance-group stringSlice List of instance groups to update (defaults to all if not specified)
--master-interval duration Time to wait between restarting masters (default 5m0s)
--node-interval duration Time to wait between restarting nodes (default 4m0s)
--yes perform rolling update without confirmation
-y, --yes Perform rolling update immediately, without --yes rolling-update executes a dry-run
```

### Options inherited from parent commands
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_update_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ kops update cluster
--phase string Subset of tasks to run: assets, cluster, network, security
--ssh-public-key string SSH public key to use (deprecated: use kops create secret instead)
--target string Target - direct, terraform, cloudformation (default "direct")
--yes Actually create cloud resources
-y, --yes Create cloud resources, without --yes update is in dry run mode
```

### Options inherited from parent commands
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/kops_update_federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ kops update federation

```
# After cluster has been edited or upgraded, configure it with:
kops update federation k8s-cluster.example.com --yes --state=s3://kops-state-1234 --yes
kops update federation k8s-cluster.example.com --state=s3://kops-state-1234
```

### Options inherited from parent commands
Expand Down

0 comments on commit a25b5d7

Please sign in to comment.