mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	Reduce indents of DumpAllNamespaceInfo()
During cleanup of DumpAllNamespaceInfo(), the code was a little unreadable. This reduces the indents for the code readability.
This commit is contained in:
		@@ -1769,14 +1769,15 @@ func DumpAllNamespaceInfo(c clientset.Interface, namespace string) {
 | 
				
			|||||||
	// 2. there are so many of them that working with them are mostly impossible
 | 
						// 2. there are so many of them that working with them are mostly impossible
 | 
				
			||||||
	// So we dump them only if the cluster is relatively small.
 | 
						// So we dump them only if the cluster is relatively small.
 | 
				
			||||||
	maxNodesForDump := TestContext.MaxNodesToGather
 | 
						maxNodesForDump := TestContext.MaxNodesToGather
 | 
				
			||||||
	if nodes, err := c.CoreV1().Nodes().List(metav1.ListOptions{}); err == nil {
 | 
						nodes, err := c.CoreV1().Nodes().List(metav1.ListOptions{})
 | 
				
			||||||
		if len(nodes.Items) <= maxNodesForDump {
 | 
						if err != nil {
 | 
				
			||||||
			dumpAllNodeInfo(c)
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			e2elog.Logf("skipping dumping cluster info - cluster too large")
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		e2elog.Logf("unable to fetch node list: %v", err)
 | 
							e2elog.Logf("unable to fetch node list: %v", err)
 | 
				
			||||||
 | 
							return
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if len(nodes.Items) <= maxNodesForDump {
 | 
				
			||||||
 | 
							dumpAllNodeInfo(c)
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							e2elog.Logf("skipping dumping cluster info - cluster too large")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user