Merge pull request #115345 from gnufied/ignore-error-when-unable-find-plugin

Ignore error when we can't find plugin capable of expanding the volum…
This commit is contained in:
Kubernetes Prow Robot 2023-01-31 05:24:50 -08:00 committed by GitHub
commit fb9884577e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,14 +280,13 @@ func (expc *expandController) syncHandler(ctx context.Context, key string) error
volumePlugin, err := expc.volumePluginMgr.FindExpandablePluginBySpec(volumeSpec)
if err != nil || volumePlugin == nil {
msg := fmt.Errorf("didn't find a plugin capable of expanding the volume; " +
"waiting for an external controller to process this PVC")
msg := "waiting for an external controller to expand this PVC"
eventType := v1.EventTypeNormal
if err != nil {
eventType = v1.EventTypeWarning
}
expc.recorder.Event(pvc, eventType, events.ExternalExpanding, fmt.Sprintf("Ignoring the PVC: %v.", msg))
klog.Infof("Ignoring the PVC %q (uid: %q) : %v.", key, pvc.UID, msg)
expc.recorder.Event(pvc, eventType, events.ExternalExpanding, msg)
klog.Infof("waiting for an external controller to expand the PVC %q (uid: %q)", key, pvc.UID)
// If we are expecting that an external plugin will handle resizing this volume then
// is no point in requeuing this PVC.
return nil