From a153f6f8856f4dedaed5eaa371b0aea7718b9c65 Mon Sep 17 00:00:00 2001 From: tianshapjq Date: Thu, 29 Dec 2016 08:44:45 +0800 Subject: [PATCH 1/2] add some specifications on the top command --- pkg/kubectl/cmd/top.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/kubectl/cmd/top.go b/pkg/kubectl/cmd/top.go index bb4080bf2ac..e24afe6a864 100644 --- a/pkg/kubectl/cmd/top.go +++ b/pkg/kubectl/cmd/top.go @@ -32,13 +32,15 @@ var ( topLong = templates.LongDesc(` Display Resource (CPU/Memory/Storage) usage. - The top command allows you to see the resource consumption for nodes or pods.`) + The top command allows you to see the resource consumption for nodes or pods. + + This command is available only if the Heapster works fine on the server. `) ) func NewCmdTop(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "top", - Short: "Display Resource (CPU/Memory/Storage) usage", + Short: "Display Resource (CPU/Memory/Storage) usage, available only if Heapster works fine on the server.", Long: topLong, Run: cmdutil.DefaultSubCommandRun(errOut), } From 2c2dba67fd5e279a0a182d7f2bca68f01a30ed27 Mon Sep 17 00:00:00 2001 From: tianshapjq Date: Wed, 4 Jan 2017 09:12:24 +0800 Subject: [PATCH 2/2] modify the specifications --- pkg/kubectl/cmd/top.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubectl/cmd/top.go b/pkg/kubectl/cmd/top.go index e24afe6a864..2c54cab3980 100644 --- a/pkg/kubectl/cmd/top.go +++ b/pkg/kubectl/cmd/top.go @@ -34,13 +34,13 @@ var ( The top command allows you to see the resource consumption for nodes or pods. - This command is available only if the Heapster works fine on the server. `) + This command requires Heapster to be correctly configured and working on the server. `) ) func NewCmdTop(f cmdutil.Factory, out, errOut io.Writer) *cobra.Command { cmd := &cobra.Command{ Use: "top", - Short: "Display Resource (CPU/Memory/Storage) usage, available only if Heapster works fine on the server.", + Short: "Display Resource (CPU/Memory/Storage) usage.", Long: topLong, Run: cmdutil.DefaultSubCommandRun(errOut), }