Skip to content

Commit 3a4c2a0

Browse files
authored
Merge pull request kubernetes#129271 from aroradaman/dual_stack_healthz
Dual stack healthz server
2 parents beeb1d2 + 271b8cf commit 3a4c2a0

File tree

10 files changed

+434
-111
lines changed

10 files changed

+434
-111
lines changed

cmd/kube-proxy/app/server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ type ProxyServer struct {
159159
Broadcaster events.EventBroadcaster
160160
Recorder events.EventRecorder
161161
NodeRef *v1.ObjectReference
162-
HealthzServer *healthcheck.ProxierHealthServer
162+
HealthzServer *healthcheck.ProxyHealthServer
163163
Hostname string
164164
PrimaryIPFamily v1.IPFamily
165165
NodeIPs map[v1.IPFamily]net.IP
@@ -224,7 +224,7 @@ func newProxyServer(ctx context.Context, config *kubeproxyconfig.KubeProxyConfig
224224
}
225225

226226
if len(config.HealthzBindAddress) > 0 {
227-
s.HealthzServer = healthcheck.NewProxierHealthServer(config.HealthzBindAddress, 2*config.SyncPeriod.Duration)
227+
s.HealthzServer = healthcheck.NewProxyHealthServer(config.HealthzBindAddress, 2*config.SyncPeriod.Duration)
228228
}
229229

230230
err = s.platformSetup(ctx)
@@ -415,7 +415,7 @@ func createClient(ctx context.Context, config componentbaseconfig.ClientConnecti
415415
return client, nil
416416
}
417417

418-
func serveHealthz(ctx context.Context, hz *healthcheck.ProxierHealthServer, errCh chan error) {
418+
func serveHealthz(ctx context.Context, hz *healthcheck.ProxyHealthServer, errCh chan error) {
419419
logger := klog.FromContext(ctx)
420420
if hz == nil {
421421
return

pkg/proxy/healthcheck/common.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ import (
2424
netutils "k8s.io/utils/net"
2525
)
2626

27-
// listener allows for testing of ServiceHealthServer and ProxierHealthServer.
27+
// listener allows for testing of ServiceHealthServer and ProxyHealthServer.
2828
type listener interface {
2929
// Listen is very much like netutils.MultiListen, except the second arg (network) is
3030
// fixed to be "tcp".
3131
Listen(ctx context.Context, addrs ...string) (net.Listener, error)
3232
}
3333

34-
// httpServerFactory allows for testing of ServiceHealthServer and ProxierHealthServer.
34+
// httpServerFactory allows for testing of ServiceHealthServer and ProxyHealthServer.
3535
type httpServerFactory interface {
3636
// New creates an instance of a type satisfying HTTPServer. This is
3737
// designed to include http.Server.
3838
New(handler http.Handler) httpServer
3939
}
4040

41-
// httpServer allows for testing of ServiceHealthServer and ProxierHealthServer.
41+
// httpServer allows for testing of ServiceHealthServer and ProxyHealthServer.
4242
// It is designed so that http.Server satisfies this interface,
4343
type httpServer interface {
4444
Serve(listener net.Listener) error

0 commit comments

Comments
 (0)