Skip to content

Commit 3ccf5b8

Browse files
committed
[kube-proxy:nftables] Add partialSync mode to only transact changed
objects. Change the order of operations to stop current iteration if no changes to the service chains are needed. Bump syncProxy frequency to 1 hour. In a test kind cluster creation of 10K services, 2 endpoints each, takes ~25m before the fix and ~9min after. Maximum memory usage during creation is ~650MiB and 260MiB respectively. Another important metric is the time it takes to create 1 new service when 10K svc already exist. It used to take ~8m before the fix, with partialSync it takes ~141ms. Signed-off-by: Nadia Pinaeva <[email protected]>
1 parent dc13e42 commit 3ccf5b8

File tree

3 files changed

+224
-71
lines changed

3 files changed

+224
-71
lines changed

pkg/proxy/metrics/metrics.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ func RegisterMetrics(mode kubeproxyconfig.ProxyMode) {
316316
legacyregistry.MustRegister(IPTablesRestoreFailuresTotal)
317317

318318
case kubeproxyconfig.ProxyModeNFTables:
319+
legacyregistry.MustRegister(SyncFullProxyRulesLatency)
320+
legacyregistry.MustRegister(SyncPartialProxyRulesLatency)
319321
legacyregistry.MustRegister(NFTablesSyncFailuresTotal)
320322
legacyregistry.MustRegister(NFTablesCleanupFailuresTotal)
321323

0 commit comments

Comments
 (0)