mirror of https://github.com/k3s-io/k3s
Merge pull request #74493 from cofyc/fix74384
Fix panic because VolumeSpec may be nil in volume reconstruction scenariopull/564/head
commit
c7a9a150e1
|
@ -732,7 +732,7 @@ func (og *operationGenerator) GenerateUnmountVolumeFunc(
|
|||
podsDir string) (volumetypes.GeneratedOperations, error) {
|
||||
|
||||
var pluginName string
|
||||
if useCSIPlugin(og.volumePluginMgr, volumeToUnmount.VolumeSpec) {
|
||||
if volumeToUnmount.VolumeSpec != nil && useCSIPlugin(og.volumePluginMgr, volumeToUnmount.VolumeSpec) {
|
||||
pluginName = csi.CSIPluginName
|
||||
} else {
|
||||
pluginName = volumeToUnmount.PluginName
|
||||
|
|
Loading…
Reference in New Issue