mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 18:27:49 +00:00
soft eviction timer works
This commit is contained in:
@@ -274,10 +274,6 @@ func (m *managerImpl) synchronize(diskInfoProvider DiskInfoProvider, podFunc Act
|
|||||||
}
|
}
|
||||||
debugLogThresholdsWithObservation("thresholds - reclaim not satisfied", thresholds, observations)
|
debugLogThresholdsWithObservation("thresholds - reclaim not satisfied", thresholds, observations)
|
||||||
|
|
||||||
// determine the set of thresholds whose stats have been updated since the last sync
|
|
||||||
thresholds = thresholdsUpdatedStats(thresholds, observations, m.lastObservations)
|
|
||||||
debugLogThresholdsWithObservation("thresholds - updated stats", thresholds, observations)
|
|
||||||
|
|
||||||
// track when a threshold was first observed
|
// track when a threshold was first observed
|
||||||
now := m.clock.Now()
|
now := m.clock.Now()
|
||||||
thresholdsFirstObservedAt := thresholdsFirstObservedAt(thresholds, m.thresholdsFirstObservedAt, now)
|
thresholdsFirstObservedAt := thresholdsFirstObservedAt(thresholds, m.thresholdsFirstObservedAt, now)
|
||||||
@@ -307,6 +303,11 @@ func (m *managerImpl) synchronize(diskInfoProvider DiskInfoProvider, podFunc Act
|
|||||||
m.thresholdsFirstObservedAt = thresholdsFirstObservedAt
|
m.thresholdsFirstObservedAt = thresholdsFirstObservedAt
|
||||||
m.nodeConditionsLastObservedAt = nodeConditionsLastObservedAt
|
m.nodeConditionsLastObservedAt = nodeConditionsLastObservedAt
|
||||||
m.thresholdsMet = thresholds
|
m.thresholdsMet = thresholds
|
||||||
|
|
||||||
|
// determine the set of thresholds whose stats have been updated since the last sync
|
||||||
|
thresholds = thresholdsUpdatedStats(thresholds, observations, m.lastObservations)
|
||||||
|
debugLogThresholdsWithObservation("thresholds - updated stats", thresholds, observations)
|
||||||
|
|
||||||
m.lastObservations = observations
|
m.lastObservations = observations
|
||||||
m.Unlock()
|
m.Unlock()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user