Skip to content

Commit 1715db6

Browse files
committed
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`.
1 parent 634c42a commit 1715db6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/patterns/addon/pkg/status/kstatus.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ func (k *kstatusAggregator) BuildStatus(ctx context.Context, info *declarative.S
8787
}
8888

8989
shouldComputeHealthFromObjects := info.Manifest != nil && info.LiveObjects != nil
90+
currentStatus.Errors = []string{}
9091
if info.Err != nil {
92+
currentStatus.Errors = []string{info.Err.Error()}
9193
switch info.KnownError {
9294
case declarative.KnownErrorApplyFailed:
9395
currentStatus.Phase = "Applying"

0 commit comments

Comments
 (0)