diff --git a/pkg/master/master.go b/pkg/master/master.go index 972397da8b1..8c24f3d3df7 100644 --- a/pkg/master/master.go +++ b/pkg/master/master.go @@ -469,15 +469,10 @@ func (m *Master) InstallLegacyAPI(c *completedConfig, restOptionsGetter generic. func (m *Master) installTunneler(nodeTunneler tunneler.Tunneler, nodeClient corev1client.NodeInterface) { nodeTunneler.Run(nodeAddressProvider{nodeClient}.externalAddresses) - m.GenericAPIServer.AddHealthChecks(healthz.NamedCheck("SSH Tunnel Check", tunneler.TunnelSyncHealthChecker(nodeTunneler))) - prometheus.NewGaugeFunc(prometheus.GaugeOpts{ - Name: "apiserver_proxy_tunnel_sync_duration_seconds", - Help: "The time since the last successful synchronization of the SSH tunnels for proxy requests.", - }, func() float64 { return float64(nodeTunneler.SecondsSinceSync()) }) - prometheus.NewGaugeFunc(prometheus.GaugeOpts{ - Name: "apiserver_proxy_tunnel_sync_latency_secs", - Help: "(Deprecated) The time since the last successful synchronization of the SSH tunnels for proxy requests.", - }, func() float64 { return float64(nodeTunneler.SecondsSinceSync()) }) + err := m.GenericAPIServer.AddHealthChecks(healthz.NamedCheck("SSH Tunnel Check", tunneler.TunnelSyncHealthChecker(nodeTunneler))) + if err != nil { + klog.Errorf("Failed adding ssh tunnel health check %v\n", err) + } } // RESTStorageProvider is a factory type for REST storage.