mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
fix panic bug
This commit is contained in:
parent
12e5db561e
commit
b87c16e6a3
@ -45,7 +45,9 @@ var _ volume.Mounter = &azureDiskMounter{}
|
||||
func (m *azureDiskMounter) GetAttributes() volume.Attributes {
|
||||
readOnly := false
|
||||
volumeSource, err := getVolumeSource(m.spec)
|
||||
if err != nil && volumeSource.ReadOnly != nil {
|
||||
if err != nil {
|
||||
glog.Infof("azureDisk - mounter failed to get volume source for spec %s %v", m.spec.Name(), err)
|
||||
} else if volumeSource.ReadOnly != nil {
|
||||
readOnly = *volumeSource.ReadOnly
|
||||
}
|
||||
return volume.Attributes{
|
||||
|
Loading…
Reference in New Issue
Block a user