@@ -89,7 +89,6 @@ import (
89
89
"k8s.io/kubernetes/pkg/serviceaccount"
90
90
nodeutil "k8s.io/kubernetes/pkg/util/node"
91
91
92
- "github.com/prometheus/client_golang/prometheus"
93
92
"k8s.io/klog"
94
93
95
94
// RESTStorage installers
@@ -469,15 +468,10 @@ func (m *Master) InstallLegacyAPI(c *completedConfig, restOptionsGetter generic.
469
468
470
469
func (m * Master ) installTunneler (nodeTunneler tunneler.Tunneler , nodeClient corev1client.NodeInterface ) {
471
470
nodeTunneler .Run (nodeAddressProvider {nodeClient }.externalAddresses )
472
- m .GenericAPIServer .AddHealthChecks (healthz .NamedCheck ("SSH Tunnel Check" , tunneler .TunnelSyncHealthChecker (nodeTunneler )))
473
- prometheus .NewGaugeFunc (prometheus.GaugeOpts {
474
- Name : "apiserver_proxy_tunnel_sync_duration_seconds" ,
475
- Help : "The time since the last successful synchronization of the SSH tunnels for proxy requests." ,
476
- }, func () float64 { return float64 (nodeTunneler .SecondsSinceSync ()) })
477
- prometheus .NewGaugeFunc (prometheus.GaugeOpts {
478
- Name : "apiserver_proxy_tunnel_sync_latency_secs" ,
479
- Help : "(Deprecated) The time since the last successful synchronization of the SSH tunnels for proxy requests." ,
480
- }, func () float64 { return float64 (nodeTunneler .SecondsSinceSync ()) })
471
+ err := m .GenericAPIServer .AddHealthChecks (healthz .NamedCheck ("SSH Tunnel Check" , tunneler .TunnelSyncHealthChecker (nodeTunneler )))
472
+ if err != nil {
473
+ klog .Errorf ("Failed adding ssh tunnel health check %v\n " , err )
474
+ }
481
475
}
482
476
483
477
// RESTStorageProvider is a factory type for REST storage.
0 commit comments