1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-27 22:14:52 +01:00

bump to official kubernetes v0.32.0 deps

Signed-off-by: Amir Alavi <amiralavi7@gmail.com>
This commit is contained in:
Amir Alavi
2024-12-13 20:03:43 -06:00
parent 51a004c848
commit 4e8c7e6702
5 changed files with 55 additions and 52 deletions

View File

@@ -48,7 +48,6 @@ type fakeClockWaiter struct {
stepInterval time.Duration
skipIfBlocked bool
destChan chan time.Time
fired bool
afterFunc func()
}
@@ -198,12 +197,10 @@ func (f *FakeClock) setTimeLocked(t time.Time) {
if w.skipIfBlocked {
select {
case w.destChan <- t:
w.fired = true
default:
}
} else {
w.destChan <- t
w.fired = true
}
if w.afterFunc != nil {
@@ -305,44 +302,48 @@ func (f *fakeTimer) C() <-chan time.Time {
return f.waiter.destChan
}
// Stop stops the timer and returns true if the timer has not yet fired, or false otherwise.
// Stop prevents the Timer from firing. It returns true if the call stops the
// timer, false if the timer has already expired or been stopped.
func (f *fakeTimer) Stop() bool {
f.fakeClock.lock.Lock()
defer f.fakeClock.lock.Unlock()
active := false
newWaiters := make([]*fakeClockWaiter, 0, len(f.fakeClock.waiters))
for i := range f.fakeClock.waiters {
w := f.fakeClock.waiters[i]
if w != &f.waiter {
newWaiters = append(newWaiters, w)
continue
}
// If timer is found, it has not been fired yet.
active = true
}
f.fakeClock.waiters = newWaiters
return !f.waiter.fired
return active
}
// Reset resets the timer to the fake clock's "now" + d. It returns true if the timer has not yet
// fired, or false otherwise.
// Reset changes the timer to expire after duration d. It returns true if the
// timer had been active, false if the timer had expired or been stopped.
func (f *fakeTimer) Reset(d time.Duration) bool {
f.fakeClock.lock.Lock()
defer f.fakeClock.lock.Unlock()
active := !f.waiter.fired
active := false
f.waiter.fired = false
f.waiter.targetTime = f.fakeClock.time.Add(d)
var isWaiting bool
for i := range f.fakeClock.waiters {
w := f.fakeClock.waiters[i]
if w == &f.waiter {
isWaiting = true
// If timer is found, it has not been fired yet.
active = true
break
}
}
if !isWaiting {
if !active {
f.fakeClock.waiters = append(f.fakeClock.waiters, &f.waiter)
}

2
vendor/k8s.io/utils/lru/lru.go generated vendored
View File

@@ -47,6 +47,8 @@ func NewWithEvictionFunc(size int, f EvictionFunc) *Cache {
// SetEvictionFunc updates the eviction func
func (c *Cache) SetEvictionFunc(f EvictionFunc) error {
c.lock.Lock()
defer c.lock.Unlock()
if c.cache.OnEvicted != nil {
return fmt.Errorf("lru cache eviction function is already set")
}

20
vendor/modules.txt vendored
View File

@@ -554,7 +554,7 @@ gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.1
## explicit
gopkg.in/yaml.v3
# k8s.io/api v0.32.0-rc.2
# k8s.io/api v0.32.0
## explicit; go 1.23.0
k8s.io/api/admission/v1
k8s.io/api/admission/v1beta1
@@ -619,7 +619,7 @@ k8s.io/api/storagemigration/v1alpha1
## explicit; go 1.22.0
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
# k8s.io/apimachinery v0.32.0-rc.2
# k8s.io/apimachinery v0.32.0
## explicit; go 1.23.0
k8s.io/apimachinery/pkg/api/equality
k8s.io/apimachinery/pkg/api/errors
@@ -684,7 +684,7 @@ k8s.io/apimachinery/pkg/version
k8s.io/apimachinery/pkg/watch
k8s.io/apimachinery/third_party/forked/golang/json
k8s.io/apimachinery/third_party/forked/golang/reflect
# k8s.io/apiserver v0.32.0-rc.2
# k8s.io/apiserver v0.32.0
## explicit; go 1.23.0
k8s.io/apiserver/pkg/admission
k8s.io/apiserver/pkg/admission/configuration
@@ -839,7 +839,7 @@ k8s.io/apiserver/plugin/pkg/audit/webhook
k8s.io/apiserver/plugin/pkg/authenticator/token/webhook
k8s.io/apiserver/plugin/pkg/authorizer/webhook
k8s.io/apiserver/plugin/pkg/authorizer/webhook/metrics
# k8s.io/client-go v0.32.0-rc.2
# k8s.io/client-go v0.32.0
## explicit; go 1.23.0
k8s.io/client-go/applyconfigurations
k8s.io/client-go/applyconfigurations/admissionregistration/v1
@@ -1178,7 +1178,7 @@ k8s.io/client-go/util/homedir
k8s.io/client-go/util/keyutil
k8s.io/client-go/util/watchlist
k8s.io/client-go/util/workqueue
# k8s.io/code-generator v0.32.0-rc.2
# k8s.io/code-generator v0.32.0
## explicit; go 1.23.0
k8s.io/code-generator
k8s.io/code-generator/cmd/applyconfiguration-gen
@@ -1214,7 +1214,7 @@ k8s.io/code-generator/cmd/register-gen/generators
k8s.io/code-generator/pkg/namer
k8s.io/code-generator/pkg/util
k8s.io/code-generator/third_party/forked/golang/reflect
# k8s.io/component-base v0.32.0-rc.2
# k8s.io/component-base v0.32.0
## explicit; go 1.23.0
k8s.io/component-base/cli
k8s.io/component-base/cli/flag
@@ -1239,7 +1239,7 @@ k8s.io/component-base/tracing
k8s.io/component-base/tracing/api/v1
k8s.io/component-base/version
k8s.io/component-base/zpages/flagz
# k8s.io/component-helpers v0.32.0-rc.2
# k8s.io/component-helpers v0.32.0
## explicit; go 1.23.0
k8s.io/component-helpers/scheduling/corev1
k8s.io/component-helpers/scheduling/corev1/nodeaffinity
@@ -1261,7 +1261,7 @@ k8s.io/klog/v2/internal/severity
k8s.io/klog/v2/internal/sloghandler
k8s.io/klog/v2/internal/verbosity
k8s.io/klog/v2/textlogger
# k8s.io/kms v0.32.0-rc.2
# k8s.io/kms v0.32.0
## explicit; go 1.23.0
k8s.io/kms/apis/v1beta1
k8s.io/kms/apis/v2
@@ -1293,7 +1293,7 @@ k8s.io/kube-openapi/pkg/validation/errors
k8s.io/kube-openapi/pkg/validation/spec
k8s.io/kube-openapi/pkg/validation/strfmt
k8s.io/kube-openapi/pkg/validation/strfmt/bson
# k8s.io/metrics v0.32.0-rc.2
# k8s.io/metrics v0.32.0
## explicit; go 1.23.0
k8s.io/metrics/pkg/apis/metrics
k8s.io/metrics/pkg/apis/metrics/v1alpha1
@@ -1305,7 +1305,7 @@ k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1
k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1alpha1/fake
k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1
k8s.io/metrics/pkg/client/clientset/versioned/typed/metrics/v1beta1/fake
# k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
# k8s.io/utils v0.0.0-20241210054802-24370beab758
## explicit; go 1.18
k8s.io/utils/buffer
k8s.io/utils/clock