mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +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 {
|
func (m *azureDiskMounter) GetAttributes() volume.Attributes {
|
||||||
readOnly := false
|
readOnly := false
|
||||||
volumeSource, err := getVolumeSource(m.spec)
|
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
|
readOnly = *volumeSource.ReadOnly
|
||||||
}
|
}
|
||||||
return volume.Attributes{
|
return volume.Attributes{
|
||||||
|
Loading…
Reference in New Issue
Block a user