Added events to kubectl describe hpa

This commit is contained in:
Piotr Szczesniak
2016-02-23 16:36:17 +01:00
parent 7f83e07465
commit 3e023411f6
2 changed files with 6 additions and 0 deletions

View File

@@ -392,6 +392,7 @@ _kubectl_describe()
must_have_one_noun+=("deployment")
must_have_one_noun+=("endpoints")
must_have_one_noun+=("horizontalpodautoscaler")
must_have_one_noun+=("horizontalpodautoscaler")
must_have_one_noun+=("ingress")
must_have_one_noun+=("job")
must_have_one_noun+=("job")

View File

@@ -1587,6 +1587,11 @@ func (d *HorizontalPodAutoscalerDescriber) Describe(namespace, name string) (str
fmt.Fprintf(out, "failed to check Replication Controller\n")
}
}
events, _ := d.client.Events(namespace).Search(hpa)
if events != nil {
DescribeEvents(events, out)
}
return nil
})
}