Skip to content

Commit 0d6f672

Browse files
authored
Merge pull request kubernetes-sigs#383 from ironcladlou/informer-source-compat
⚠️ source: make the Informer source compatible with cache.Informer
2 parents 90226f9 + bb84391 commit 0d6f672

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pkg/source/source.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
"sigs.k8s.io/controller-runtime/pkg/runtime/inject"
3030
"sigs.k8s.io/controller-runtime/pkg/source/internal"
3131

32-
toolscache "k8s.io/client-go/tools/cache"
3332
"sigs.k8s.io/controller-runtime/pkg/cache"
3433
"sigs.k8s.io/controller-runtime/pkg/predicate"
3534
)
@@ -243,8 +242,8 @@ func (cs *Channel) syncLoop() {
243242

244243
// Informer is used to provide a source of events originating inside the cluster from Watches (e.g. Pod Create)
245244
type Informer struct {
246-
// Informer is the generated client-go Informer
247-
Informer toolscache.SharedIndexInformer
245+
// Informer is the controller-runtime Informer
246+
Informer cache.Informer
248247
}
249248

250249
var _ Source = &Informer{}

0 commit comments

Comments
 (0)