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

Consistent help messages for all commands #685

Merged
merged 1 commit into from
Aug 2, 2019
Merged

Consistent help messages for all commands #685

merged 1 commit into from
Aug 2, 2019

Conversation

kensipe
Copy link
Member

@kensipe kensipe commented Aug 1, 2019

What type of PR is this?
/component kudoctl
/kind cleanup

What this PR does / why we need it:
Commands previously were inconsistent with usage info... some used the default (like test and get) however several overrode the default help. All the overrides resulted in the help text not be displayed at all. For instance go run cmd/kubectl-kudo/main.go update --help
resulted in:

Update installed KUDO operator with new parameters.

Usage:
  kubectl-kudo update <instance-name> [flags]

Flags:
  -h, --help                    help for update
      --kubeconfig string       Path to your Kubernetes configuration file (default "/Users/kensipe/.kube/config")
      --namespace string        The namespace where the instance you want to upgrade is installed in. (default "default")
  -p, --parameter stringArray   The parameter name and value separated by '='

Now it results in:

go run cmd/kubectl-kudo/main.go update --help
Update installed KUDO operator with new parameters.

Usage:
  kubectl-kudo update <instance-name> [flags]

Examples:

		The update argument must be a name of the instance.

		# Update dev-flink instance with setting parameter param with value value
		kubectl kudo update dev-flink -p param=value

		# Update dev-flink instance in namespace services with setting parameter param with value value
		kubectl kudo update dev-flink -n services -p param=value

Flags:
  -h, --help                    help for update
      --namespace string        The namespace where the instance you want to upgrade is installed in. (default "default")
  -p, --parameter stringArray   The parameter name and value separated by '='

Global Flags:
      --kubeconfig string   Path to your Kubernetes configuration file (default "/Users/kensipe/.kube/config")

Making use of the examples in code. It also has the advantage of showing what the global flags are.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@jbarrick-mesosphere
Copy link
Member

/approve

-25, +0, my favorite kind of PR

@kudo-ci
Copy link

kudo-ci commented Aug 1, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jbarrick-mesosphere, kensipe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [jbarrick-mesosphere,kensipe]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@alenkacz
Copy link
Contributor

alenkacz commented Aug 2, 2019

nice 👏

/lgtm

@kudo-ci kudo-ci added the lgtm label Aug 2, 2019
@kudo-ci kudo-ci merged commit 8ae7542 into master Aug 2, 2019
@kudo-ci kudo-ci deleted the ken/cmds branch August 2, 2019 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants