From 6535ac1e619bd1f91fa35582e7a50843f93c8dde Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 17 May 2023 15:37:55 -0400 Subject: [PATCH] Simplify nftables/proxier.go by removing Monitor stuff since it shouldn't be necessary --- pkg/proxy/nftables/proxier.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkg/proxy/nftables/proxier.go b/pkg/proxy/nftables/proxier.go index 2978f4736b0..0e28ee6bd48 100644 --- a/pkg/proxy/nftables/proxier.go +++ b/pkg/proxy/nftables/proxier.go @@ -74,9 +74,6 @@ const ( // kubeProxyFirewallChain is the kube-proxy firewall chain kubeProxyFirewallChain utiliptables.Chain = "KUBE-PROXY-FIREWALL" - - // kube proxy canary chain is used for monitoring rule reload - kubeProxyCanaryChain utiliptables.Chain = "KUBE-PROXY-CANARY" ) const sysctlNFConntrackTCPBeLiberal = "net/netfilter/nf_conntrack_tcp_be_liberal" @@ -265,13 +262,7 @@ func NewProxier(ipFamily v1.IPFamily, burstSyncs := 2 klog.V(2).InfoS("Iptables sync params", "ipFamily", ipt.Protocol(), "minSyncPeriod", minSyncPeriod, "syncPeriod", syncPeriod, "burstSyncs", burstSyncs) - // We pass syncPeriod to ipt.Monitor, which will call us only if it needs to. - // We need to pass *some* maxInterval to NewBoundedFrequencyRunner anyway though. - // time.Hour is arbitrary. - proxier.syncRunner = async.NewBoundedFrequencyRunner("sync-runner", proxier.syncProxyRules, minSyncPeriod, time.Hour, burstSyncs) - - go ipt.Monitor(kubeProxyCanaryChain, []utiliptables.Table{utiliptables.TableMangle, utiliptables.TableNAT, utiliptables.TableFilter}, - proxier.syncProxyRules, syncPeriod, wait.NeverStop) + proxier.syncRunner = async.NewBoundedFrequencyRunner("sync-runner", proxier.syncProxyRules, minSyncPeriod, syncPeriod, burstSyncs) return proxier, nil }