mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	declare in front
This commit is contained in:
		@@ -308,7 +308,8 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []v1.Volume, namespace s
 | 
				
			|||||||
				continue
 | 
									continue
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if pvc.Spec.VolumeName == "" {
 | 
								pvName := pvc.Spec.VolumeName
 | 
				
			||||||
 | 
								if pvName == "" {
 | 
				
			||||||
				// PVC is not bound. It was either deleted and created again or
 | 
									// PVC is not bound. It was either deleted and created again or
 | 
				
			||||||
				// it was forcefuly unbound by admin. The pod can still use the
 | 
									// it was forcefuly unbound by admin. The pod can still use the
 | 
				
			||||||
				// original PV where it was bound to -> log the error and count
 | 
									// original PV where it was bound to -> log the error and count
 | 
				
			||||||
@@ -318,7 +319,6 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []v1.Volume, namespace s
 | 
				
			|||||||
				continue
 | 
									continue
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			pvName := pvc.Spec.VolumeName
 | 
					 | 
				
			||||||
			pv, err := c.pvInfo.GetPersistentVolumeInfo(pvName)
 | 
								pv, err := c.pvInfo.GetPersistentVolumeInfo(pvName)
 | 
				
			||||||
			if err != nil || pv == nil {
 | 
								if err != nil || pv == nil {
 | 
				
			||||||
				// if the PV is not found, log the error
 | 
									// if the PV is not found, log the error
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user