Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Change shorthand --enable-type flag to avoid typo #1121

Merged
merged 2 commits into from
Aug 21, 2019
Merged
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Unreleased
- [#1121](https://github.com/kubernetes-sigs/kubefed/pull/1121) Update
`kubefedctl federate` shorthand option for `--enable-type` to `-t` instead
of `-e` to avoid confusing error message when only one dash is accidentally
used e.g. `-enable-type`, resulting in a valid parsing of flags but
erroneous use of the option.

# v0.1.0-rc6
- [#1099](https://github.com/kubernetes-sigs/kubefed/pull/1099)
2 changes: 1 addition & 1 deletion pkg/kubefedctl/federate/federate.go
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ type federateResource struct {
func (j *federateResource) Bind(flags *pflag.FlagSet) {
flags.StringVarP(&j.resourceNamespace, "namespace", "n", "", "The namespace of the resource to federate.")
flags.StringVarP(&j.output, "output", "o", "", "If provided, the resource that would be created in the API by the command is instead output to stdout in the provided format. Valid format is ['yaml'].")
flags.BoolVarP(&j.enableType, "enable-type", "e", false, "If true, attempt to enable federation of the API type of the resource before creating the federated resource.")
flags.BoolVarP(&j.enableType, "enable-type", "t", false, "If true, attempt to enable federation of the API type of the resource before creating the federated resource.")
flags.BoolVarP(&j.federateContents, "contents", "c", false, "Applicable only to namespaces. If provided, the command will federate all resources within the namespace after federating the namespace.")
flags.StringVarP(&j.filename, "filename", "f", "", "If specified, the provided yaml file will be used as the input for target resources to federate. This mode will only emit federated resource yaml to standard output. Other flag options if provided will be ignored.")
flags.StringSliceVarP(&j.skipAPIResourceNames, "skip-api-resources", "s", []string{}, "Comma separated names of the api resources to skip when federating contents in a namespace. Name could be short name "+