report an event if kubelet does attach operation failed when kubelet is running with --enable-controller-attach-detach=false

This commit is contained in:
carlory 2024-05-15 18:40:29 +08:00
parent b9fd30665c
commit 02b158055d

View File

@ -253,6 +253,7 @@ func (rc *reconciler) waitForVolumeAttach(volumeToMount cache.VolumeToMount) {
VolumeName: volumeToMount.VolumeName,
VolumeSpec: volumeToMount.VolumeSpec,
NodeName: rc.nodeName,
ScheduledPods: []*v1.Pod{volumeToMount.Pod},
}
klog.V(5).InfoS(volumeToAttach.GenerateMsgDetailed("Starting operationExecutor.AttachVolume", ""), "pod", klog.KObj(volumeToMount.Pod))
err := rc.operationExecutor.AttachVolume(logger, volumeToAttach, rc.actualStateOfWorld)