mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Change isVolumeConflict so read-only gce persistent disks don't conflict with each other
This commit is contained in:
		@@ -52,12 +52,13 @@ func (nodes ClientNodeInfo) GetNodeInfo(nodeID string) (*api.Node, error) {
 | 
			
		||||
 | 
			
		||||
func isVolumeConflict(volume api.Volume, pod *api.Pod) bool {
 | 
			
		||||
	if volume.GCEPersistentDisk != nil {
 | 
			
		||||
		pdName := volume.GCEPersistentDisk.PDName
 | 
			
		||||
		disk := volume.GCEPersistentDisk
 | 
			
		||||
 | 
			
		||||
		manifest := &(pod.Spec)
 | 
			
		||||
		for ix := range manifest.Volumes {
 | 
			
		||||
			if manifest.Volumes[ix].GCEPersistentDisk != nil &&
 | 
			
		||||
				manifest.Volumes[ix].GCEPersistentDisk.PDName == pdName {
 | 
			
		||||
				manifest.Volumes[ix].GCEPersistentDisk.PDName == disk.PDName &&
 | 
			
		||||
				!(manifest.Volumes[ix].GCEPersistentDisk.ReadOnly && disk.ReadOnly) {
 | 
			
		||||
				return true
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user