Better distinguish the two kinds of proxy health check servers

Kube-proxy runs two different health servers; one for monitoring the
health of kube-proxy itself, and one for monitoring the health of
specific services. Rename them to "ProxierHealthServer" and
"ServiceHealthServer" to make this clearer, and do a bit of API
cleanup too.
This commit is contained in:
Dan Winship
2019-09-27 07:37:59 -04:00
parent ded22e3975
commit 0f10102c16
17 changed files with 297 additions and 304 deletions

View File

@@ -482,7 +482,7 @@ type ProxyServer struct {
UseEndpointSlices bool
OOMScoreAdj *int32
ConfigSyncPeriod time.Duration
HealthzServer *healthcheck.HealthzServer
HealthzServer *healthcheck.ProxierHealthServer
}
// createClients creates a kube client and an event client from the given config and masterOverride.

View File

@@ -125,11 +125,9 @@ func newProxyServer(
Namespace: "",
}
var healthzServer *healthcheck.HealthzServer
var healthzUpdater healthcheck.HealthzUpdater
var healthzServer *healthcheck.ProxierHealthServer
if len(config.HealthzBindAddress) > 0 {
healthzServer = healthcheck.NewDefaultHealthzServer(config.HealthzBindAddress, 2*config.IPTables.SyncPeriod.Duration, recorder, nodeRef)
healthzUpdater = healthzServer
healthzServer = healthcheck.NewProxierHealthServer(config.HealthzBindAddress, 2*config.IPTables.SyncPeriod.Duration, recorder, nodeRef)
}
var proxier proxy.Provider
@@ -162,7 +160,7 @@ func newProxyServer(
hostname,
nodeIP,
recorder,
healthzUpdater,
healthzServer,
config.NodePortAddresses,
)
if err != nil {

View File

@@ -87,11 +87,9 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
Namespace: "",
}
var healthzServer *healthcheck.HealthzServer
var healthzUpdater healthcheck.HealthzUpdater
var healthzServer *healthcheck.ProxierHealthServer
if len(config.HealthzBindAddress) > 0 {
healthzServer = healthcheck.NewDefaultHealthzServer(config.HealthzBindAddress, 2*config.IPTables.SyncPeriod.Duration, recorder, nodeRef)
healthzUpdater = healthzServer
healthzServer = healthcheck.NewProxierHealthServer(config.HealthzBindAddress, 2*config.IPTables.SyncPeriod.Duration, recorder, nodeRef)
}
var proxier proxy.Provider
@@ -108,7 +106,7 @@ func newProxyServer(config *proxyconfigapi.KubeProxyConfiguration, cleanupAndExi
hostname,
utilnode.GetNodeIP(client, hostname),
recorder,
healthzUpdater,
healthzServer,
config.Winkernel,
)
if err != nil {