We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CanSupport
1 parent 57d197f commit a43cc08Copy full SHA for a43cc08
pkg/volume/image/image.go
@@ -49,7 +49,7 @@ func (o *imagePlugin) GetPluginName() string { return
49
func (o *imagePlugin) GetVolumeName(spec *volume.Spec) (string, error) { return o.spec.Name(), nil }
50
51
func (o *imagePlugin) CanSupport(spec *volume.Spec) bool {
52
- return spec.Volume.Image != nil
+ return spec != nil && spec.Volume != nil && spec.Volume.Image != nil
53
}
54
55
func (o *imagePlugin) NewMounter(spec *volume.Spec, podRef *v1.Pod, opts volume.VolumeOptions) (volume.Mounter, error) {
0 commit comments