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