From fa046b995ff2877d5ef18974dc094aee795647e2 Mon Sep 17 00:00:00 2001 From: vportella Date: Thu, 28 Sep 2023 11:29:00 +1000 Subject: [PATCH] Add logging for the error returned when a health check does not pass --- pkg/controller/cyclenoderequest/transitioner/checks.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/controller/cyclenoderequest/transitioner/checks.go b/pkg/controller/cyclenoderequest/transitioner/checks.go index adbce87..e2e303a 100644 --- a/pkg/controller/cyclenoderequest/transitioner/checks.go +++ b/pkg/controller/cyclenoderequest/transitioner/checks.go @@ -179,6 +179,7 @@ func (t *CycleNodeRequestTransitioner) performHealthCheck(node v1.CycleNodeReque // Still within the waiting period here, must trigger requeueing this phase if err := healthCheckPassed(healthCheck, statusCode, body); err != nil { + t.rm.Logger.Error(err, "Health check did not pass", "endpoint", endpoint, "error", err) return true, fmt.Errorf("health check did not pass for the endpoint %s, got: (%d) %s", endpoint, statusCode, string(body)) }