From 81832c69000a883b4128e134a163f88524347a3c Mon Sep 17 00:00:00 2001 From: Martin Schneppenheim Date: Wed, 27 Mar 2019 11:43:26 +0100 Subject: [PATCH] Add log message for failed health check --- kubernetes/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kubernetes/client.go b/kubernetes/client.go index 6a7dda3..3536ba4 100644 --- a/kubernetes/client.go +++ b/kubernetes/client.go @@ -108,6 +108,9 @@ func (c *Client) NodeMetricses() (*v1beta1.NodeMetricsList, error) { func (c *Client) IsHealthy() bool { _, err := c.apiClient.CoreV1().Pods(metav1.NamespaceAll).List(metav1.ListOptions{}) if err != nil { + log.WithFields(log.Fields{ + "error": err.Error(), + }).Error("kubernetes client is not healthy") return false }