Merge pull request #100874 from lojies/proxyiptableslog

improve the readability of log
This commit is contained in:
Kubernetes Prow Robot 2021-04-10 19:04:37 -07:00 committed by GitHub
commit eda1de301a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1615,7 +1615,7 @@ func (proxier *Proxier) syncProxyRules() {
numberNatIptablesRules := utilproxy.CountBytesLines(proxier.natRules.Bytes())
metrics.IptablesRulesTotal.WithLabelValues(string(utiliptables.TableNAT)).Set(float64(numberNatIptablesRules))
klog.V(5).InfoS("Restoring iptables", "rules", proxier.iptablesData.Bytes())
klog.V(5).InfoS("Restoring iptables", "rules", string(proxier.iptablesData.Bytes()))
err = proxier.iptables.RestoreAll(proxier.iptablesData.Bytes(), utiliptables.NoFlushTables, utiliptables.RestoreCounters)
if err != nil {
klog.ErrorS(err, "Failed to execute iptables-restore")