kubectl: run validation for 'top pod'

This commit is contained in:
Michail Kargakis
2016-09-12 17:59:31 +02:00
parent 520cd7e6f3
commit 4787dca073
2 changed files with 6 additions and 0 deletions

View File

@@ -119,6 +119,9 @@ func (o TopNodeOptions) RunTopNode() error {
if err != nil {
return err
}
if len(metrics) == 0 {
return errors.New("metrics not available yet")
}
var nodes []api.Node
if len(o.ResourceName) > 0 {