File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,8 @@ import (
67
67
metricsfeatures "k8s.io/component-base/metrics/features"
68
68
"k8s.io/component-base/metrics/legacyregistry"
69
69
"k8s.io/component-base/metrics/prometheus/slis"
70
+ zpagesfeatures "k8s.io/component-base/zpages/features"
71
+ "k8s.io/component-base/zpages/statusz"
70
72
runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
71
73
"k8s.io/cri-client/pkg/util"
72
74
podresourcesapi "k8s.io/kubelet/pkg/apis/podresources/v1"
@@ -105,6 +107,8 @@ const (
105
107
debugFlagPath = "/debug/flags/v"
106
108
podsPath = "/pods"
107
109
runningPodsPath = "/runningpods/"
110
+
111
+ kubeletComponent = "kubelet"
108
112
)
109
113
110
114
// Server is a http.Handler which exposes kubelet functionality over HTTP.
@@ -406,6 +410,10 @@ func (s *Server) InstallDefaultHandlers() {
406
410
checkers = append (checkers , s .extendedCheckers ... )
407
411
healthz .InstallHandler (s .restfulCont , checkers ... )
408
412
413
+ if utilfeature .DefaultFeatureGate .Enabled (zpagesfeatures .ComponentStatusz ) {
414
+ statusz .Install (s .restfulCont , kubeletComponent , statusz .NewRegistry ())
415
+ }
416
+
409
417
slis.SLIMetricsWithReset {}.Install (s .restfulCont )
410
418
411
419
s .addMetricsBucketMatcher ("pods" )
You can’t perform that action at this time.
0 commit comments