Merge pull request #90297 from deads2k/silence-usage

stop printing usage help when the server commands exit
This commit is contained in:
Kubernetes Prow Robot 2020-04-20 14:05:49 -07:00 committed by GitHub
commit 8b0a7dea1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,6 +104,9 @@ func NewAPIServerCommand() *cobra.Command {
for the api objects which include pods, services, replicationcontrollers, and
others. The API Server services REST operations and provides the frontend to the
cluster's shared state through which all other components interact.`,
// stop printing usage when the command errors
SilenceUsage: true,
RunE: func(cmd *cobra.Command, args []string) error {
verflag.PrintAndExitIfRequested()
utilflag.PrintFlags(cmd.Flags())