Failing to load KubeStateMetrics should only warn (#3394)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-07-15 13:52:21 -04:00
1 parent 873a165a60
commit c3823b9d27
1 file changed
+2 -4
@@ -51,11 +51,9 @@ export class PodsStore extends KubeObjectStore<Pod> {
async loadKubeMetrics(namespace?: string) {
try {
const metrics = await podMetricsApi.list({ namespace });
this.kubeMetrics.replace(metrics);
this.kubeMetrics.replace(await podMetricsApi.list({ namespace }));
} catch (error) {
console.error("loadKubeMetrics failed", error);
console.warn("loadKubeMetrics failed", error);
}
}