From aec00235bcc36b6b2cc0799a0b89d9e7bccdd8c6 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Sat, 25 Jan 2020 13:53:41 +0000 Subject: [PATCH] Add info for metrics-server You can now run k3sup app info metrics-server, yay. Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- cmd/app.go | 8 +++++++- cmd/apps/metricsserver_app.go | 22 ++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/cmd/app.go b/cmd/app.go index 780a5085..7ad16f5c 100644 --- a/cmd/app.go +++ b/cmd/app.go @@ -72,13 +72,19 @@ command.`, switch appName { case "inlets-operator": + fmt.Printf("Info for app: %s\n", appName) fmt.Println(apps.InletsOperatorInfoMsg) case "openfaas": + fmt.Printf("Info for app: %s\n", appName) fmt.Println(apps.OpenFaaSInfoMsg) case "mongodb": + fmt.Printf("Info for app: %s\n", appName) fmt.Println(apps.MongoDBInfoMsg) + case "metrics-server": + fmt.Printf("Info for app: %s\n", appName) + fmt.Println(apps.MetricsInfoMsg) default: - return fmt.Errorf("no info or no app available for %s", appName) + return fmt.Errorf("no info available for app: %s", appName) } return nil diff --git a/cmd/apps/metricsserver_app.go b/cmd/apps/metricsserver_app.go index f32602bd..74bb7ab5 100644 --- a/cmd/apps/metricsserver_app.go +++ b/cmd/apps/metricsserver_app.go @@ -125,7 +125,17 @@ func MakeInstallMetricsServer() *cobra.Command { # from the cluster. Try these commands and wait a few moments if # no data is showing. -# Check pod usage +` + MetricsInfoMsg + ` + +` + pkg.ThanksForUsing) + + return nil + } + + return metricsServer +} + +const MetricsInfoMsg = `# Check pod usage kubectl top pod @@ -135,12 +145,4 @@ kubectl top node # Find out more at: -# https://github.com/helm/charts/tree/master/stable/metrics-server - -` + pkg.ThanksForUsing) - - return nil - } - - return metricsServer -} +# https://github.com/helm/charts/tree/master/stable/metrics-server`