Skip to content

Commit

Permalink
Track info.Err in the status field
Browse files Browse the repository at this point in the history
This allows the reconcilation errors such as errors encountered in the
object transformers to be tracked in the field `status.errors`.
  • Loading branch information
haiyanmeng committed Jun 10, 2024
1 parent 634c42a commit 1715db6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/patterns/addon/pkg/status/kstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ func (k *kstatusAggregator) BuildStatus(ctx context.Context, info *declarative.S
}

shouldComputeHealthFromObjects := info.Manifest != nil && info.LiveObjects != nil
currentStatus.Errors = []string{}
if info.Err != nil {
currentStatus.Errors = []string{info.Err.Error()}
switch info.KnownError {
case declarative.KnownErrorApplyFailed:
currentStatus.Phase = "Applying"
Expand Down

0 comments on commit 1715db6

Please sign in to comment.