Skip to content

Commit

Permalink
Add info for metrics-server
Browse files Browse the repository at this point in the history
You can now run k3sup app info metrics-server, yay.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Jan 25, 2020
1 parent 012474f commit aec0023
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
8 changes: 7 additions & 1 deletion cmd/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 12 additions & 10 deletions cmd/apps/metricsserver_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`

0 comments on commit aec0023

Please sign in to comment.