Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon: Use LastSuccessInteraction instead of LastInteraction #31019

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions daemon/cmd/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ const (
// version is verified even if connectivity is given
k8sVersionCheckInterval = 15 * time.Minute

// k8sMinimumEventHearbeat is the time interval in which any received
// k8sMinimumEventHeartbeat is the time interval in which any received
// event will be considered proof that the apiserver connectivity is
// healthty
k8sMinimumEventHearbeat = time.Minute
// healthy
k8sMinimumEventHeartbeat = time.Minute
)

var randGen = rand.NewSafeRand(time.Now().UnixNano())
Expand All @@ -66,7 +66,7 @@ func (k *k8sVersion) cachedVersion() (string, bool) {
k.lock.Lock()
defer k.lock.Unlock()

if time.Since(k8smetrics.LastInteraction.Time()) > k8sMinimumEventHearbeat {
if time.Since(k8smetrics.LastSuccessInteraction.Time()) > k8sMinimumEventHeartbeat {
return "", false
}

Expand Down