Add error check to heapsterclient response

Add labelSelector to pod metrics api
Remove pod metrics in resources API
This commit is contained in:
jeff
2018-06-26 14:42:36 +08:00
parent 471c5d7b48
commit 8a04650e29
8 changed files with 80 additions and 58 deletions

View File

@@ -73,7 +73,8 @@ func handleAllPods(_ *restful.Request, response *restful.Response) {
// Get pods metrics in namespace
func handlePodsUnderNameSpace(request *restful.Request, response *restful.Response) {
var result constants.PageableResponse
result = metrics.GetPodMetricsInNamespace(request.PathParameter("namespace"))
labelSelector := request.QueryParameter("labelSelector")
result = metrics.GetPodMetricsInNamespace(request.PathParameter("namespace"), labelSelector)
response.WriteAsJson(result)
}