From 8a73e79777ceb9fa3677aca0e2e6312116434dd8 Mon Sep 17 00:00:00 2001 From: Quan Tian Date: Thu, 8 Sep 2022 22:47:53 +0800 Subject: [PATCH] Fix outdated code comments of proxierHealthServer Signed-off-by: Quan Tian --- pkg/proxy/healthcheck/proxier_health.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/proxy/healthcheck/proxier_health.go b/pkg/proxy/healthcheck/proxier_health.go index 77ea1542d52..01f0d70d544 100644 --- a/pkg/proxy/healthcheck/proxier_health.go +++ b/pkg/proxy/healthcheck/proxier_health.go @@ -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())