mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 15:05:20 +00:00
proxy: followup to last-queued-change metric
Fixes two small issues with the metric added in #90175: 1. Bump the timestamp on initial informer sync. Otherwise it remains 0 if restarting kube-proxy in a quiescent cluster, which isn't quite right. 2. Bump the timestamp even if no healthz server is specified.
This commit is contained in:
@@ -810,8 +810,8 @@ func CleanupLeftovers(ipvs utilipvs.Interface, ipt utiliptables.Interface, ipset
|
||||
func (proxier *Proxier) Sync() {
|
||||
if proxier.healthzServer != nil {
|
||||
proxier.healthzServer.QueuedUpdate()
|
||||
metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime()
|
||||
}
|
||||
metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime()
|
||||
proxier.syncRunner.Run()
|
||||
}
|
||||
|
||||
@@ -821,6 +821,8 @@ func (proxier *Proxier) SyncLoop() {
|
||||
if proxier.healthzServer != nil {
|
||||
proxier.healthzServer.Updated()
|
||||
}
|
||||
// synthesize "last change queued" time as the informers are syncing.
|
||||
metrics.SyncProxyRulesLastQueuedTimestamp.SetToCurrentTime()
|
||||
proxier.syncRunner.Loop(wait.NeverStop)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user