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 @@ -207,13 +207,14 @@ func (p *csiPlugin) Init(host volume.VolumeHost) error {
207
207
if utilfeature .DefaultFeatureGate .Enabled (features .CSIDriverRegistry ) {
208
208
csiClient := host .GetKubeClient ()
209
209
if csiClient == nil {
210
- return errors .New ("unable to get Kubernetes client" )
210
+ klog .Warning (log ("kubeclient not set, assuming standalone kubelet" ))
211
+ } else {
212
+ // Start informer for CSIDrivers.
213
+ factory := csiapiinformer .NewSharedInformerFactory (csiClient , csiResyncPeriod )
214
+ p .csiDriverInformer = factory .Storage ().V1beta1 ().CSIDrivers ()
215
+ p .csiDriverLister = p .csiDriverInformer .Lister ()
216
+ go factory .Start (wait .NeverStop )
211
217
}
212
- // Start informer for CSIDrivers.
213
- factory := csiapiinformer .NewSharedInformerFactory (csiClient , csiResyncPeriod )
214
- p .csiDriverInformer = factory .Storage ().V1beta1 ().CSIDrivers ()
215
- p .csiDriverLister = p .csiDriverInformer .Lister ()
216
- go factory .Start (wait .NeverStop )
217
218
}
218
219
219
220
// Initializing the label management channels
You can’t perform that action at this time.
0 commit comments