mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-25 11:31:44 +00:00
Rename nftables sync failure metric
This commit is contained in:
parent
1823de063b
commit
fc05a294cc
@ -185,6 +185,17 @@ var (
|
||||
[]string{"table"},
|
||||
)
|
||||
|
||||
// NFTablesSyncFailuresTotal is the number of nftables sync failures that the
|
||||
// proxy has seen.
|
||||
NFTablesSyncFailuresTotal = metrics.NewCounter(
|
||||
&metrics.CounterOpts{
|
||||
Subsystem: kubeProxySubsystem,
|
||||
Name: "sync_proxy_rules_nftables_sync_failures_total",
|
||||
Help: "Cumulative proxy nftables sync failures",
|
||||
StabilityLevel: metrics.ALPHA,
|
||||
},
|
||||
)
|
||||
|
||||
// ProxyHealthzTotal is the number of returned HTTP Status for each
|
||||
// healthz probe.
|
||||
ProxyHealthzTotal = metrics.NewCounterVec(
|
||||
@ -268,8 +279,7 @@ func RegisterMetrics(mode kubeproxyconfig.ProxyMode) {
|
||||
legacyregistry.MustRegister(IPTablesRestoreFailuresTotal)
|
||||
|
||||
case kubeproxyconfig.ProxyModeNFTables:
|
||||
// FIXME: should not use the iptables-specific metric
|
||||
legacyregistry.MustRegister(IPTablesRestoreFailuresTotal)
|
||||
legacyregistry.MustRegister(NFTablesSyncFailuresTotal)
|
||||
|
||||
case kubeproxyconfig.ProxyModeKernelspace:
|
||||
// currently no winkernel-specific metrics
|
||||
|
@ -1620,7 +1620,7 @@ func (proxier *Proxier) syncProxyRules() {
|
||||
err = proxier.nftables.Run(context.TODO(), tx)
|
||||
if err != nil {
|
||||
proxier.logger.Error(err, "nftables sync failed")
|
||||
metrics.IPTablesRestoreFailuresTotal.Inc()
|
||||
metrics.NFTablesSyncFailuresTotal.Inc()
|
||||
return
|
||||
}
|
||||
success = true
|
||||
|
Loading…
Reference in New Issue
Block a user