Move /resetMetrics to DELETE /metrics

Reduces the surface area of the API server slightly and allows
downstream components to have deleteable metrics. After this change
genericapiserver will *not* have metrics unless the caller defines it
(allows different apiserver implementations to make that choice on their
own).
This commit is contained in:
Clayton Coleman
2016-04-06 17:52:28 -04:00
parent ff1da7674d
commit 0f95b91f96
3 changed files with 16 additions and 8 deletions

View File

@@ -315,7 +315,7 @@ func VerifyPodStartupLatency(latency PodStartupLatency) error {
// Resets latency metrics in apiserver.
func ResetMetrics(c *client.Client) error {
Logf("Resetting latency metrics in apiserver...")
body, err := c.Get().AbsPath("/resetMetrics").DoRaw()
body, err := c.Delete().AbsPath("/metrics").DoRaw()
if err != nil {
return err
}