Merge pull request #112324 from tnqn/fix-outdated-comment

Fix outdated code comments of proxierHealthServer
This commit is contained in:
Kubernetes Prow Robot 2022-09-22 12:51:04 -07:00 committed by GitHub
commit df89bbc4d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,13 +79,16 @@ func newProxierHealthServer(listener listener, httpServerFactory httpServerFacto
}
}
// Updated updates the lastUpdated timestamp.
// Updated indicates that kube-proxy has successfully updated its backend, so it should
// be considered healthy now.
func (hs *proxierHealthServer) Updated() {
hs.oldestPendingQueued.Store(zeroTime)
hs.lastUpdated.Store(hs.clock.Now())
}
// QueuedUpdate updates the lastQueued timestamp.
// QueuedUpdate indicates that the proxy has received changes from the apiserver but
// has not yet pushed them to its backend. If the proxy does not call Updated within the
// healthTimeout time then it will be considered unhealthy.
func (hs *proxierHealthServer) QueuedUpdate() {
// Set oldestPendingQueued only if it's currently zero
hs.oldestPendingQueued.CompareAndSwap(zeroTime, hs.clock.Now())