mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Add blank /stats/summary kubelet endpoint
Add a `/stats/summary` endpoint to the kubelet which will return an
empty Summary{} struct (json formatted), as a summary API
placeholder. Once the next cAdvisor release is vendored, the summary
API will be filled in.
			
			
This commit is contained in:
		| @@ -56,6 +56,7 @@ func CreateHandlers(provider StatsProvider) *restful.WebService { | ||||
| 		handler restful.RouteFunction | ||||
| 	}{ | ||||
| 		{"", h.handleStats}, | ||||
| 		{"/summary", h.handleSummary}, | ||||
| 		{"/container", h.handleSystemContainer}, | ||||
| 		{"/{podName}/{containerName}", h.handlePodContainer}, | ||||
| 		{"/{namespace}/{podName}/{uid}/{containerName}", h.handlePodContainer}, | ||||
| @@ -134,6 +135,15 @@ func (h *handler) handleStats(request *restful.Request, response *restful.Respon | ||||
| 	writeResponse(response, statsMap["/"]) | ||||
| } | ||||
|  | ||||
| // Handles stats summary requests to /stats/summary | ||||
| func (h *handler) handleSummary(request *restful.Request, response *restful.Response) { | ||||
| 	summary := Summary{} | ||||
|  | ||||
| 	// TODO(timstclair): Fill in summary from cAdvisor v2 endpoint. | ||||
|  | ||||
| 	writeResponse(response, summary) | ||||
| } | ||||
|  | ||||
| // Handles non-kubernetes container stats requests to /stats/container/ | ||||
| func (h *handler) handleSystemContainer(request *restful.Request, response *restful.Response) { | ||||
| 	query, err := parseStatsRequest(request) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Tim St. Clair
					Tim St. Clair