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

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

commit 69d2af9b6dd9c5cbc624795a4a8cd658781c3d4b
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Fri Sep 29 16:03:21 2023 +0200

    feat(ctrl): add kit failure reason condition
---
 pkg/apis/camel/v1/integration_types_support.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pkg/apis/camel/v1/integration_types_support.go 
b/pkg/apis/camel/v1/integration_types_support.go
index 553c4ae2c..89b8ce670 100644
--- a/pkg/apis/camel/v1/integration_types_support.go
+++ b/pkg/apis/camel/v1/integration_types_support.go
@@ -235,6 +235,10 @@ func (in *Integration) SetIntegrationKit(kit 
*IntegrationKit) {
                        message = "creating a new integration kit"
                } else {
                        message = fmt.Sprintf("integration kit %s/%s is in 
state %q", kit.Namespace, kit.Name, kit.Status.Phase)
+                       if kit.Status.Phase == IntegrationKitPhaseError {
+                               // Append specific reason for the failure
+                               message = message + ". Failure: " + 
kit.Status.Failure.Reason
+                       }
                }
        }
 

Reply via email to