mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Print an external IP for Nodes in a density test for easier log lookup
This commit is contained in:
parent
2a92988392
commit
98633316a5
@ -138,11 +138,16 @@ var _ = Describe("Density", func() {
|
|||||||
|
|
||||||
Logf("Listing nodes for easy debugging:\n")
|
Logf("Listing nodes for easy debugging:\n")
|
||||||
for _, node := range nodes.Items {
|
for _, node := range nodes.Items {
|
||||||
|
var internalIP, externalIP string
|
||||||
for _, address := range node.Status.Addresses {
|
for _, address := range node.Status.Addresses {
|
||||||
if address.Type == api.NodeInternalIP {
|
if address.Type == api.NodeInternalIP {
|
||||||
Logf("Name: %v IP: %v", node.ObjectMeta.Name, address.Address)
|
internalIP = address.Address
|
||||||
|
}
|
||||||
|
if address.Type == api.NodeExternalIP {
|
||||||
|
externalIP = address.Address
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Logf("Name: %v, clusterIP: %v, externalIP: %v", node.ObjectMeta.Name, internalIP, externalIP)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user