mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
fix: skip pods with empty ip
This commit is contained in:
parent
32c14da902
commit
781c65a40c
@ -50,6 +50,9 @@ func SetupMetricsProxy(c clientset.Interface) error {
|
||||
}
|
||||
var foundComponents []componentInfo
|
||||
for _, pod := range podList.Items {
|
||||
if len(pod.Status.PodIP) == 0 {
|
||||
continue
|
||||
}
|
||||
switch {
|
||||
case strings.HasPrefix(pod.Name, "kube-scheduler-"):
|
||||
foundComponents = append(foundComponents, componentInfo{
|
||||
|
Loading…
Reference in New Issue
Block a user