proxy/iptables: Add metric for partial sync failures, add test

This commit is contained in:
Dan Winship
2022-08-15 17:07:12 -04:00
parent ab326d2f4e
commit 818de5a545
5 changed files with 187 additions and 8 deletions

View File

@@ -846,6 +846,9 @@ func (proxier *Proxier) syncProxyRules() {
if !success {
klog.InfoS("Sync failed", "retryingTime", proxier.syncPeriod)
proxier.syncRunner.RetryAfter(proxier.syncPeriod)
if tryPartialSync {
metrics.IptablesPartialRestoreFailuresTotal.Inc()
}
// proxier.serviceChanges and proxier.endpointChanges have already
// been flushed, so we've lost the state needed to be able to do
// a partial sync.