From dac9d4c2e41ac3ec5924bb3ca551292b9eaa3f81 Mon Sep 17 00:00:00 2001 From: Haiyan Meng Date: Fri, 31 May 2024 19:35:08 +0000 Subject: [PATCH] Track info.Err in the status field This allows the reconcilation errors such as errors encountered in the object transformers to be tracked in the field `status.errors`. --- pkg/patterns/addon/pkg/status/kstatus.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/patterns/addon/pkg/status/kstatus.go b/pkg/patterns/addon/pkg/status/kstatus.go index c0691705..87de92d2 100644 --- a/pkg/patterns/addon/pkg/status/kstatus.go +++ b/pkg/patterns/addon/pkg/status/kstatus.go @@ -88,6 +88,7 @@ func (k *kstatusAggregator) BuildStatus(ctx context.Context, info *declarative.S shouldComputeHealthFromObjects := info.Manifest != nil && info.LiveObjects != nil if info.Err != nil { + currentStatus.Errors = []string{info.Err.Error()} switch info.KnownError { case declarative.KnownErrorApplyFailed: currentStatus.Phase = "Applying"