mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: bump the k8s-dependencies group in /e2e with 3 updates
Bumps the k8s-dependencies group in /e2e with 3 updates: [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery), [k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider) and [k8s.io/pod-security-admission](https://github.com/kubernetes/pod-security-admission). Updates `k8s.io/apimachinery` from 0.32.3 to 0.33.0 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.32.3...v0.33.0) Updates `k8s.io/cloud-provider` from 0.32.3 to 0.33.0 - [Commits](https://github.com/kubernetes/cloud-provider/compare/v0.32.3...v0.33.0) Updates `k8s.io/pod-security-admission` from 0.32.3 to 0.33.0 - [Commits](https://github.com/kubernetes/pod-security-admission/compare/v0.32.3...v0.33.0) --- updated-dependencies: - dependency-name: k8s.io/apimachinery dependency-version: 0.33.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-dependencies - dependency-name: k8s.io/cloud-provider dependency-version: 0.33.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-dependencies - dependency-name: k8s.io/pod-security-admission dependency-version: 0.33.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
d52dc2c4ba
commit
dd77e72800
37
e2e/vendor/k8s.io/apimachinery/pkg/watch/watch.go
generated
vendored
37
e2e/vendor/k8s.io/apimachinery/pkg/watch/watch.go
generated
vendored
@ -23,6 +23,7 @@ import (
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/utils/ptr"
|
||||
)
|
||||
|
||||
// Interface can be implemented by anything that knows how to watch and report changes.
|
||||
@ -103,21 +104,34 @@ func (w emptyWatch) ResultChan() <-chan Event {
|
||||
|
||||
// FakeWatcher lets you test anything that consumes a watch.Interface; threadsafe.
|
||||
type FakeWatcher struct {
|
||||
logger klog.Logger
|
||||
result chan Event
|
||||
stopped bool
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
var _ Interface = &FakeWatcher{}
|
||||
|
||||
// Contextual logging: NewFakeWithOptions and a logger in the FakeOptions should be used instead in code which supports contextual logging.
|
||||
func NewFake() *FakeWatcher {
|
||||
return NewFakeWithOptions(FakeOptions{})
|
||||
}
|
||||
|
||||
// Contextual logging: NewFakeWithOptions and a logger in the FakeOptions should be used instead in code which supports contextual logging.
|
||||
func NewFakeWithChanSize(size int, blocking bool) *FakeWatcher {
|
||||
return NewFakeWithOptions(FakeOptions{ChannelSize: size})
|
||||
}
|
||||
|
||||
func NewFakeWithOptions(options FakeOptions) *FakeWatcher {
|
||||
return &FakeWatcher{
|
||||
result: make(chan Event),
|
||||
logger: ptr.Deref(options.Logger, klog.Background()),
|
||||
result: make(chan Event, options.ChannelSize),
|
||||
}
|
||||
}
|
||||
|
||||
func NewFakeWithChanSize(size int, blocking bool) *FakeWatcher {
|
||||
return &FakeWatcher{
|
||||
result: make(chan Event, size),
|
||||
}
|
||||
type FakeOptions struct {
|
||||
Logger *klog.Logger
|
||||
ChannelSize int
|
||||
}
|
||||
|
||||
// Stop implements Interface.Stop().
|
||||
@ -125,7 +139,7 @@ func (f *FakeWatcher) Stop() {
|
||||
f.Lock()
|
||||
defer f.Unlock()
|
||||
if !f.stopped {
|
||||
klog.V(4).Infof("Stopping fake watcher.")
|
||||
f.logger.V(4).Info("Stopping fake watcher")
|
||||
close(f.result)
|
||||
f.stopped = true
|
||||
}
|
||||
@ -176,13 +190,22 @@ func (f *FakeWatcher) Action(action EventType, obj runtime.Object) {
|
||||
|
||||
// RaceFreeFakeWatcher lets you test anything that consumes a watch.Interface; threadsafe.
|
||||
type RaceFreeFakeWatcher struct {
|
||||
logger klog.Logger
|
||||
result chan Event
|
||||
Stopped bool
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
var _ Interface = &RaceFreeFakeWatcher{}
|
||||
|
||||
// Contextual logging: RaceFreeFakeWatcherWithLogger should be used instead of NewRaceFreeFake in code which supports contextual logging.
|
||||
func NewRaceFreeFake() *RaceFreeFakeWatcher {
|
||||
return NewRaceFreeFakeWithLogger(klog.Background())
|
||||
}
|
||||
|
||||
func NewRaceFreeFakeWithLogger(logger klog.Logger) *RaceFreeFakeWatcher {
|
||||
return &RaceFreeFakeWatcher{
|
||||
logger: logger,
|
||||
result: make(chan Event, DefaultChanSize),
|
||||
}
|
||||
}
|
||||
@ -192,7 +215,7 @@ func (f *RaceFreeFakeWatcher) Stop() {
|
||||
f.Lock()
|
||||
defer f.Unlock()
|
||||
if !f.Stopped {
|
||||
klog.V(4).Infof("Stopping fake watcher.")
|
||||
f.logger.V(4).Info("Stopping fake watcher")
|
||||
close(f.result)
|
||||
f.Stopped = true
|
||||
}
|
||||
|
Reference in New Issue
Block a user