mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #76741 from logicalhan/install-tunneler-bugs
Two bugfixes in installTunneler
This commit is contained in:
		@@ -129,7 +129,6 @@ go_library(
 | 
			
		||||
        "//staging/src/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/client-go/kubernetes/typed/discovery/v1beta1:go_default_library",
 | 
			
		||||
        "//staging/src/k8s.io/client-go/rest:go_default_library",
 | 
			
		||||
        "//vendor/github.com/prometheus/client_golang/prometheus:go_default_library",
 | 
			
		||||
        "//vendor/k8s.io/klog:go_default_library",
 | 
			
		||||
        "//vendor/k8s.io/utils/integer:go_default_library",
 | 
			
		||||
        "//vendor/k8s.io/utils/net:go_default_library",
 | 
			
		||||
 
 | 
			
		||||
@@ -89,7 +89,6 @@ import (
 | 
			
		||||
	"k8s.io/kubernetes/pkg/serviceaccount"
 | 
			
		||||
	nodeutil "k8s.io/kubernetes/pkg/util/node"
 | 
			
		||||
 | 
			
		||||
	"github.com/prometheus/client_golang/prometheus"
 | 
			
		||||
	"k8s.io/klog"
 | 
			
		||||
 | 
			
		||||
	// RESTStorage installers
 | 
			
		||||
@@ -469,15 +468,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.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user