mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #126323 from saschagrunert/image-volume-runtime-panic
Fix runtime panic in imagevolume `CanSupport` method
This commit is contained in:
commit
ceb58a4dbc
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user