This is an automated email from the ASF dual-hosted git repository.

tsato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit ab366fc2c1ee2c4dbe5a4bcbc2c485f0ebf1852b
Author: Tadayoshi Sato <sato.tadayo...@gmail.com>
AuthorDate: Wed Nov 16 16:45:09 2022 +0900

    fix(controller): Ready condition message not always taken from Camel Health 
Checks
    
    Fix #3761
---
 pkg/controller/integration/monitor.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pkg/controller/integration/monitor.go 
b/pkg/controller/integration/monitor.go
index a42456be7..cee670a96 100644
--- a/pkg/controller/integration/monitor.go
+++ b/pkg/controller/integration/monitor.go
@@ -274,7 +274,12 @@ func (action *monitorAction) 
updateIntegrationPhaseAndReadyCondition(
                return err
        }
 
+       readyPods, unreadyPods := filterPodsByReadyStatus(runningPods, 
controller.getPodSpec())
+
        if done, err := controller.checkReadyCondition(ctx); done || err != nil 
{
+               // There may be pods that are not ready but still probable for 
getting error messages.
+               // Ignore returned error from probing as it's expected when the 
ctrl obj is not ready.
+               _ = action.probeReadiness(ctx, environment, integration, 
unreadyPods)
                return err
        }
        if done := checkPodStatuses(integration, pendingPods, runningPods); 
done {
@@ -282,7 +287,6 @@ func (action *monitorAction) 
updateIntegrationPhaseAndReadyCondition(
        }
        integration.Status.Phase = v1.IntegrationPhaseRunning
 
-       readyPods, unreadyPods := filterPodsByReadyStatus(runningPods, 
controller.getPodSpec())
        if done := controller.updateReadyCondition(readyPods); done {
                return nil
        }

Reply via email to