mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-04 18:52:38 +00:00
Added code for disable scheduler cache expiry
This commit is contained in:
2
pkg/scheduler/internal/cache/cache.go
vendored
2
pkg/scheduler/internal/cache/cache.go
vendored
@@ -750,7 +750,7 @@ func (cache *cacheImpl) cleanupAssumedPods(now time.Time) {
|
||||
"pod", klog.KObj(ps.pod))
|
||||
continue
|
||||
}
|
||||
if now.After(*ps.deadline) {
|
||||
if cache.ttl != 0 && now.After(*ps.deadline) {
|
||||
klog.InfoS("Pod expired", "pod", klog.KObj(ps.pod))
|
||||
if err := cache.removePod(ps.pod); err != nil {
|
||||
klog.ErrorS(err, "ExpirePod failed", "pod", klog.KObj(ps.pod))
|
||||
|
@@ -53,7 +53,7 @@ import (
|
||||
const (
|
||||
// Duration the scheduler will wait before expiring an assumed pod.
|
||||
// See issue #106361 for more details about this parameter and its value.
|
||||
durationToExpireAssumedPod = 15 * time.Minute
|
||||
durationToExpireAssumedPod = 0 * time.Minute
|
||||
)
|
||||
|
||||
// ErrNoNodesAvailable is used to describe the error that no nodes available to schedule pods.
|
||||
|
Reference in New Issue
Block a user