fix: skip pods with empty ip
This commit is contained in:
@@ -50,6 +50,9 @@ func SetupMetricsProxy(c clientset.Interface) error {
|
|||||||
}
|
}
|
||||||
var foundComponents []componentInfo
|
var foundComponents []componentInfo
|
||||||
for _, pod := range podList.Items {
|
for _, pod := range podList.Items {
|
||||||
|
if len(pod.Status.PodIP) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
switch {
|
switch {
|
||||||
case strings.HasPrefix(pod.Name, "kube-scheduler-"):
|
case strings.HasPrefix(pod.Name, "kube-scheduler-"):
|
||||||
foundComponents = append(foundComponents, componentInfo{
|
foundComponents = append(foundComponents, componentInfo{
|
||||||
|
Reference in New Issue
Block a user