mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
migrate kube-proxy metrics to stability framework
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"k8s.io/component-base/metrics/legacyregistry"
|
||||
"net/http"
|
||||
"os"
|
||||
goruntime "runtime"
|
||||
@@ -74,7 +75,6 @@ import (
|
||||
utilpointer "k8s.io/utils/pointer"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
"k8s.io/klog"
|
||||
@@ -549,7 +549,7 @@ func (s *ProxyServer) Run() error {
|
||||
proxyMux.HandleFunc("/proxyMode", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Fprintf(w, "%s", s.ProxyMode)
|
||||
})
|
||||
proxyMux.Handle("/metrics", prometheus.Handler())
|
||||
proxyMux.Handle("/metrics", legacyregistry.Handler())
|
||||
if s.EnableProfiling {
|
||||
routes.Profiling{}.Install(proxyMux)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user