From acdf50fbedb533864c9edfe23c64664018662d93 Mon Sep 17 00:00:00 2001 From: "Khaled (Kal) Henidak" Date: Tue, 7 Sep 2021 22:13:24 +0000 Subject: [PATCH] change proxiers to pass nodePortAddresses --- pkg/proxy/iptables/proxier.go | 2 +- pkg/proxy/ipvs/proxier.go | 2 +- pkg/proxy/winkernel/proxier.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/proxy/iptables/proxier.go b/pkg/proxy/iptables/proxier.go index 8605b536bfa..a094c0e34c7 100644 --- a/pkg/proxy/iptables/proxier.go +++ b/pkg/proxy/iptables/proxier.go @@ -280,7 +280,7 @@ func NewProxier(ipt utiliptables.Interface, masqueradeMark := fmt.Sprintf("%#08x", masqueradeValue) klog.V(2).InfoS("Using iptables mark for masquerade", "ipFamily", ipt.Protocol(), "mark", masqueradeMark) - serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder) + serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder, nodePortAddresses) ipFamily := v1.IPv4Protocol if ipt.IsIPv6() { diff --git a/pkg/proxy/ipvs/proxier.go b/pkg/proxy/ipvs/proxier.go index 666f3b41b00..478d1e802f6 100644 --- a/pkg/proxy/ipvs/proxier.go +++ b/pkg/proxy/ipvs/proxier.go @@ -441,7 +441,7 @@ func NewProxier(ipt utiliptables.Interface, scheduler = DefaultScheduler } - serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder) + serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder, nodePortAddresses) ipFamilyMap := utilproxy.MapCIDRsByIPFamily(nodePortAddresses) nodePortAddresses = ipFamilyMap[ipFamily] diff --git a/pkg/proxy/winkernel/proxier.go b/pkg/proxy/winkernel/proxier.go index 85217214f69..de01c7dddd9 100644 --- a/pkg/proxy/winkernel/proxier.go +++ b/pkg/proxy/winkernel/proxier.go @@ -642,7 +642,7 @@ func NewProxier( klog.InfoS("clusterCIDR not specified, unable to distinguish between internal and external traffic") } - serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder) + serviceHealthServer := healthcheck.NewServiceHealthServer(hostname, recorder, []string{} /* windows listen to all node addresses */) hns, supportedFeatures := newHostNetworkService() hnsNetworkName, err := getNetworkName(config.NetworkName) if err != nil {