reword the warning that gets printed on external expansion

This commit is contained in:
Hemant Kumar 2023-01-30 10:35:21 -05:00
parent 1e57dae5ec
commit c9fc35c496

View File

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