mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
No need to log empty string
This commit is contained in:
parent
445deb21e6
commit
74901ae150
@ -151,7 +151,7 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []api.Volume, namespace
|
|||||||
} else if vol.PersistentVolumeClaim != nil {
|
} else if vol.PersistentVolumeClaim != nil {
|
||||||
pvcName := vol.PersistentVolumeClaim.ClaimName
|
pvcName := vol.PersistentVolumeClaim.ClaimName
|
||||||
if pvcName == "" {
|
if pvcName == "" {
|
||||||
return fmt.Errorf("PersistentVolumeClaim had no name: %q", pvcName)
|
return fmt.Errorf("PersistentVolumeClaim had no name")
|
||||||
}
|
}
|
||||||
pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName)
|
pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -304,7 +304,7 @@ func (c *VolumeZoneChecker) predicate(pod *api.Pod, nodeInfo *schedulercache.Nod
|
|||||||
if volume.PersistentVolumeClaim != nil {
|
if volume.PersistentVolumeClaim != nil {
|
||||||
pvcName := volume.PersistentVolumeClaim.ClaimName
|
pvcName := volume.PersistentVolumeClaim.ClaimName
|
||||||
if pvcName == "" {
|
if pvcName == "" {
|
||||||
return false, fmt.Errorf("PersistentVolumeClaim had no name: %q", pvcName)
|
return false, fmt.Errorf("PersistentVolumeClaim had no name")
|
||||||
}
|
}
|
||||||
pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName)
|
pvc, err := c.pvcInfo.GetPersistentVolumeClaimInfo(namespace, pvcName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user