mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #19725 from timstclair/summary
Add blank /stats/summary kubelet endpoint
This commit is contained in:
commit
7d96694c3f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user