mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #108442 from NikhilSharmaWe/volMan
Managing nil pointer in VolumeManager
This commit is contained in:
commit
2f7d53bbf1
@ -604,7 +604,11 @@ func getDeviceMountPath(volume *reconstructedVolume) (string, error) {
|
|||||||
|
|
||||||
func (rc *reconciler) updateStates(volumesNeedUpdate map[v1.UniqueVolumeName]*reconstructedVolume) error {
|
func (rc *reconciler) updateStates(volumesNeedUpdate map[v1.UniqueVolumeName]*reconstructedVolume) error {
|
||||||
// Get the node status to retrieve volume device path information.
|
// Get the node status to retrieve volume device path information.
|
||||||
|
// Skip reporting devicePath in node objects if kubeClient is nil.
|
||||||
|
// In standalone mode, kubelet is not expected to mount any attachable volume types or secret, configmaps etc.
|
||||||
|
if rc.kubeClient != nil {
|
||||||
rc.updateDevicePath(volumesNeedUpdate)
|
rc.updateDevicePath(volumesNeedUpdate)
|
||||||
|
}
|
||||||
|
|
||||||
for _, volume := range volumesNeedUpdate {
|
for _, volume := range volumesNeedUpdate {
|
||||||
err := rc.actualStateOfWorld.MarkVolumeAsAttached(
|
err := rc.actualStateOfWorld.MarkVolumeAsAttached(
|
||||||
|
Loading…
Reference in New Issue
Block a user