Update custom-metrics-apiserver and metrics-server

This commit is contained in:
Johannes Würbach 2020-09-27 22:14:53 +02:00
parent 4c673534f2
commit b480e45a67
No known key found for this signature in database
GPG key ID: 74DB0F4D956CCCE3
915 changed files with 63694 additions and 106514 deletions

View file

@ -230,11 +230,7 @@ func (m *podMetrics) getPodMetrics(pods ...*v1.Pod) ([]metrics.PodMetrics, error
Namespace: pod.Namespace,
}
}
timestamps, containerMetrics, err := m.metrics.GetContainerMetrics(namespacedNames...)
if err != nil {
return nil, err
}
timestamps, containerMetrics := m.metrics.GetContainerMetrics(namespacedNames...)
res := make([]metrics.PodMetrics, 0, len(pods))
for i, pod := range pods {
@ -243,7 +239,6 @@ func (m *podMetrics) getPodMetrics(pods ...*v1.Pod) ([]metrics.PodMetrics, error
continue
}
if containerMetrics[i] == nil {
klog.Errorf("unable to fetch pod metrics for pod %s/%s: no metrics known for pod", pod.Namespace, pod.Name)
continue
}