Skip to content

Commit 8b0a7de

Browse files
authored
Merge pull request kubernetes#90297 from deads2k/silence-usage
stop printing usage help when the server commands exit
2 parents 0e072a8 + 871d6dd commit 8b0a7de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/kube-apiserver/app/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ func NewAPIServerCommand() *cobra.Command {
104104
for the api objects which include pods, services, replicationcontrollers, and
105105
others. The API Server services REST operations and provides the frontend to the
106106
cluster's shared state through which all other components interact.`,
107+
108+
// stop printing usage when the command errors
109+
SilenceUsage: true,
107110
RunE: func(cmd *cobra.Command, args []string) error {
108111
verflag.PrintAndExitIfRequested()
109112
utilflag.PrintFlags(cmd.Flags())

0 commit comments

Comments
 (0)