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 1, 2024
1 parent 83bd9c0 commit 77f0a4b
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 77f0a4b

Please sign in to comment.