Deprecated metrics under /metrics/resource/v1alpha1

This commit is contained in:
RainbowMango
2019-12-15 18:34:37 +08:00
parent 0db7074e1a
commit ecf5f7d749
3 changed files with 11 additions and 5 deletions

View File

@@ -320,6 +320,7 @@ func (s *Server) InstallDefaultHandlers(enableCAdvisorJSONEndpoints bool) {
compbasemetrics.HandlerFor(r, compbasemetrics.HandlerOpts{ErrorHandling: compbasemetrics.ContinueOnError}),
)
// deprecated endpoint which will be removed in release 1.20.0+.
v1alpha1ResourceRegistry := compbasemetrics.NewKubeRegistry()
v1alpha1ResourceRegistry.CustomMustRegister(stats.NewPrometheusResourceMetricCollector(s.resourceAnalyzer, v1alpha1.Config()))
s.restfulCont.Handle(path.Join(resourceMetricsPath, v1alpha1.Version),