File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
staging/src/k8s.io/apiserver/pkg/server/routes Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ limitations under the License.
17
17
package routes
18
18
19
19
import (
20
- "io"
21
- "net/http"
22
-
23
20
apimetrics "k8s.io/apiserver/pkg/endpoints/metrics"
24
21
"k8s.io/apiserver/pkg/server/mux"
25
22
etcd3metrics "k8s.io/apiserver/pkg/storage/etcd3/metrics"
@@ -43,18 +40,7 @@ type MetricsWithReset struct{}
43
40
// Install adds the MetricsWithReset handler
44
41
func (m MetricsWithReset ) Install (c * mux.PathRecorderMux ) {
45
42
register ()
46
- defaultMetricsHandler := legacyregistry .Handler ().ServeHTTP
47
- c .HandleFunc ("/metrics" , func (w http.ResponseWriter , req * http.Request ) {
48
- if req .Method == "DELETE" {
49
- apimetrics .Reset ()
50
- etcd3metrics .Reset ()
51
- flowcontrolmetrics .Reset ()
52
-
53
- io .WriteString (w , "metrics reset\n " )
54
- return
55
- }
56
- defaultMetricsHandler (w , req )
57
- })
43
+ c .Handle ("/metrics" , legacyregistry .HandlerWithReset ())
58
44
}
59
45
60
46
// register apiserver and etcd metrics
You can’t perform that action at this time.
0 commit comments