Merge pull request #126323 from saschagrunert/image-volume-runtime-panic
Fix runtime panic in imagevolume `CanSupport` method
This commit is contained in:
@@ -49,7 +49,7 @@ func (o *imagePlugin) GetPluginName() string { return
|
||||
func (o *imagePlugin) GetVolumeName(spec *volume.Spec) (string, error) { return o.spec.Name(), nil }
|
||||
|
||||
func (o *imagePlugin) CanSupport(spec *volume.Spec) bool {
|
||||
return spec.Volume.Image != nil
|
||||
return spec != nil && spec.Volume != nil && spec.Volume.Image != nil
|
||||
}
|
||||
|
||||
func (o *imagePlugin) NewMounter(spec *volume.Spec, podRef *v1.Pod) (volume.Mounter, error) {
|
||||
|
||||
Reference in New Issue
Block a user