File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -215,13 +215,14 @@ func (p *csiPlugin) Init(host volume.VolumeHost) error {
215
215
if utilfeature .DefaultFeatureGate .Enabled (features .CSIDriverRegistry ) {
216
216
csiClient := host .GetKubeClient ()
217
217
if csiClient == nil {
218
- return errors .New ("unable to get Kubernetes client" )
218
+ klog .Warning (log ("kubeclient not set, assuming standalone kubelet" ))
219
+ } else {
220
+ // Start informer for CSIDrivers.
221
+ factory := csiapiinformer .NewSharedInformerFactory (csiClient , csiResyncPeriod )
222
+ p .csiDriverInformer = factory .Storage ().V1beta1 ().CSIDrivers ()
223
+ p .csiDriverLister = p .csiDriverInformer .Lister ()
224
+ go factory .Start (wait .NeverStop )
219
225
}
220
- // Start informer for CSIDrivers.
221
- factory := csiapiinformer .NewSharedInformerFactory (csiClient , csiResyncPeriod )
222
- p .csiDriverInformer = factory .Storage ().V1beta1 ().CSIDrivers ()
223
- p .csiDriverLister = p .csiDriverInformer .Lister ()
224
- go factory .Start (wait .NeverStop )
225
226
}
226
227
227
228
var migratedPlugins = map [string ](func () bool ){
You can’t perform that action at this time.
0 commit comments