Fix crash caused by resouce discovery failed

This commit is contained in:
hongming
2022-04-28 18:55:47 +08:00
parent ef5fcbd9ce
commit 7603c74ebb
3 changed files with 186 additions and 188 deletions

View File

@@ -17,6 +17,7 @@ limitations under the License.
package informers
import (
"reflect"
"time"
snapshotclient "github.com/kubernetes-csi/external-snapshotter/client/v4/clientset/versioned"
@@ -51,6 +52,11 @@ type InformerFactory interface {
Start(stopCh <-chan struct{})
}
type GenericInformerFactory interface {
Start(stopCh <-chan struct{})
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
}
type informerFactories struct {
informerFactory k8sinformers.SharedInformerFactory
ksInformerFactory ksinformers.SharedInformerFactory