mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Feature-gate CSINode and CSIDriver informer starts
This commit is contained in:
@@ -33,6 +33,7 @@ import (
|
||||
"k8s.io/client-go/informers"
|
||||
coreinformers "k8s.io/client-go/informers/core/v1"
|
||||
policyv1beta1informers "k8s.io/client-go/informers/policy/v1beta1"
|
||||
storagev1beta1informers "k8s.io/client-go/informers/storage/v1beta1"
|
||||
clientset "k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/tools/events"
|
||||
@@ -287,6 +288,11 @@ func New(client clientset.Interface,
|
||||
pdbInformer = informerFactory.Policy().V1beta1().PodDisruptionBudgets()
|
||||
}
|
||||
|
||||
var csiNodeInformer storagev1beta1informers.CSINodeInformer
|
||||
if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.CSINodeInfo) {
|
||||
csiNodeInformer = informerFactory.Storage().V1beta1().CSINodes()
|
||||
}
|
||||
|
||||
// Set up the configurator which can create schedulers from configs.
|
||||
configurator := NewConfigFactory(&ConfigFactoryArgs{
|
||||
Client: client,
|
||||
@@ -301,7 +307,7 @@ func New(client clientset.Interface,
|
||||
ServiceInformer: informerFactory.Core().V1().Services(),
|
||||
PdbInformer: pdbInformer,
|
||||
StorageClassInformer: informerFactory.Storage().V1().StorageClasses(),
|
||||
CSINodeInformer: informerFactory.Storage().V1beta1().CSINodes(),
|
||||
CSINodeInformer: csiNodeInformer,
|
||||
VolumeBinder: volumeBinder,
|
||||
SchedulerCache: schedulerCache,
|
||||
HardPodAffinitySymmetricWeight: options.hardPodAffinitySymmetricWeight,
|
||||
|
||||
Reference in New Issue
Block a user