Skip to content

Commit 3d85034

Browse files
committed
kube-proxy: list available endpoints in /statusz
1 parent 9eb462e commit 3d85034

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

cmd/kube-proxy/app/server.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ const (
8585
kubeProxy = "kube-proxy"
8686
)
8787

88+
const (
89+
livezPath = "/livez"
90+
readyzPath = "/readyz"
91+
metricsPath = "/metrics"
92+
proxyModePath = "/proxyMode"
93+
)
94+
8895
func init() {
8996
utilruntime.Must(metricsfeatures.AddFeatureGates(utilfeature.DefaultMutableFeatureGate))
9097
utilruntime.Must(logsapi.AddFeatureGates(utilfeature.DefaultMutableFeatureGate))
@@ -486,7 +493,15 @@ func serveMetrics(ctx context.Context, bindAddress string, proxyMode kubeproxyco
486493
}
487494

488495
if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentStatusz) {
489-
statusz.Install(proxyMux, kubeProxy, statusz.NewRegistry(compatibility.DefaultBuildEffectiveVersion()))
496+
statusz.Install(proxyMux, kubeProxy, statusz.NewRegistry(compatibility.DefaultBuildEffectiveVersion(),
497+
statusz.WithListedPaths([]string{
498+
livezPath,
499+
readyzPath,
500+
healthz.DefaultHealthzPath,
501+
metricsPath,
502+
proxyModePath,
503+
}),
504+
))
490505
}
491506

492507
fn := func() {

0 commit comments

Comments
 (0)