Remove invalid comment in legacyregistry

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
This commit is contained in:
Shivam Sandbhor 2021-11-10 10:19:40 +05:30
parent 3b9bd229b2
commit 6652c54d83
5 changed files with 0 additions and 7 deletions

View File

@ -623,7 +623,6 @@ func serveMetrics(bindAddress, proxyMode string, enableProfiling bool, errCh cha
fmt.Fprintf(w, "%s", proxyMode)
})
//nolint:staticcheck // SA1019 See the Metrics Stability Migration KEP
proxyMux.Handle("/metrics", legacyregistry.Handler())
if enableProfiling {

View File

@ -4,7 +4,6 @@ vendor/k8s.io/apimachinery/pkg/util/json
vendor/k8s.io/apimachinery/pkg/util/strategicpatch
vendor/k8s.io/apiserver/pkg/server/dynamiccertificates
vendor/k8s.io/apiserver/pkg/server/filters
vendor/k8s.io/apiserver/pkg/server/routes
vendor/k8s.io/apiserver/pkg/storage/value/encrypt/envelope
vendor/k8s.io/apiserver/pkg/util/wsstream
vendor/k8s.io/client-go/rest

View File

@ -353,7 +353,6 @@ func (s *Server) InstallDefaultHandlers() {
s.addMetricsBucketMatcher("metrics/cadvisor")
s.addMetricsBucketMatcher("metrics/probes")
s.addMetricsBucketMatcher("metrics/resource")
//nolint:staticcheck // SA1019 https://github.com/kubernetes/enhancements/issues/1206
s.restfulCont.Handle(metricsPath, legacyregistry.Handler())
// cAdvisor metrics are exposed under the secured handler as well

View File

@ -53,9 +53,6 @@ func init() {
// Handler returns an HTTP handler for the DefaultGatherer. It is
// already instrumented with InstrumentHandler (using "prometheus" as handler
// name).
//
// Deprecated: Please note the issues described in the doc comment of
// InstrumentHandler. You might want to consider using promhttp.Handler instead.
func Handler() http.Handler {
return promhttp.InstrumentMetricHandler(prometheus.DefaultRegisterer, promhttp.HandlerFor(defaultRegistry, promhttp.HandlerOpts{}))
}

View File

@ -66,7 +66,6 @@ func NewBaseHandler(c *componentbaseconfig.DebuggingConfiguration, healthzHandle
routes.DebugFlags{}.Install(mux, "v", routes.StringFlagPutHandler(logs.GlogSetter))
}
configz.InstallHandler(mux)
//nolint:staticcheck // SA1019 See the Metrics Stability Migration KEP
mux.Handle("/metrics", legacyregistry.Handler())
return mux