mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
adding support for expanding in use persistent volumes for Flex
This commit is contained in:
@@ -208,13 +208,16 @@ func (expc *expandController) pvcUpdate(oldObj, newObj interface{}) {
|
||||
return
|
||||
}
|
||||
|
||||
// Filter PVCs for which the corresponding volume plugins don't allow expansion.
|
||||
volumeSpec := volume.NewSpecFromPersistentVolume(pv, false)
|
||||
volumePlugin, err := expc.volumePluginMgr.FindExpandablePluginBySpec(volumeSpec)
|
||||
if err != nil || volumePlugin == nil {
|
||||
err = fmt.Errorf("didn't find a plugin capable of expanding the volume; " +
|
||||
"waiting for an external controller to process this PVC")
|
||||
expc.recorder.Event(newPVC, v1.EventTypeNormal, events.ExternalExpanding,
|
||||
eventType := v1.EventTypeNormal
|
||||
if err != nil {
|
||||
eventType = v1.EventTypeWarning
|
||||
}
|
||||
expc.recorder.Event(newPVC, eventType, events.ExternalExpanding,
|
||||
fmt.Sprintf("Ignoring the PVC: %v.", err))
|
||||
glog.V(3).Infof("Ignoring the PVC %q (uid: %q) : %v.",
|
||||
util.GetPersistentVolumeClaimQualifiedName(newPVC), newPVC.UID, err)
|
||||
|
||||
Reference in New Issue
Block a user