From c9fc35c4963410d1da3fb31b955c1636993b10ac Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Mon, 30 Jan 2023 10:35:21 -0500 Subject: [PATCH] reword the warning that gets printed on external expansion --- pkg/controller/volume/expand/expand_controller.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg/controller/volume/expand/expand_controller.go b/pkg/controller/volume/expand/expand_controller.go index 62f33c8bb1a..31a01ae56c4 100644 --- a/pkg/controller/volume/expand/expand_controller.go +++ b/pkg/controller/volume/expand/expand_controller.go @@ -280,9 +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") - klog.Infof("Ignoring the PVC %q (uid: %q) : %v.", key, pvc.UID, msg) + 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, 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