diff --git a/pkg/bootstrap/bootstrap_plain_git.go b/pkg/bootstrap/bootstrap_plain_git.go index c8a1de04c4..473050fdb1 100644 --- a/pkg/bootstrap/bootstrap_plain_git.go +++ b/pkg/bootstrap/bootstrap_plain_git.go @@ -418,6 +418,7 @@ func (b *PlainGitBootstrapper) ReportKustomizationHealth(ctx context.Context, op err = fmt.Errorf("kustomization '%s' not ready: '%s'", objKey, readyCondition.Message) } } + b.logger.Failuref(err.Error()) return fmt.Errorf("error while waiting for Kustomization to be ready: '%s'", err) } b.logger.Successf("Kustomization reconciled successfully") @@ -446,9 +447,10 @@ func (b *PlainGitBootstrapper) ReportGitRepoHealth(ctx context.Context, options if errors.Is(err, context.DeadlineExceeded) { readyCondition := apimeta.FindStatusCondition(g.Status.Conditions, meta.ReadyCondition) if readyCondition != nil && readyCondition.Status != metav1.ConditionTrue { - return fmt.Errorf("gitrepository '%s' not ready: '%s'", objKey, readyCondition.Message) + err = fmt.Errorf("gitrepository '%s' not ready: '%s'", objKey, readyCondition.Message) } } + b.logger.Failuref(err.Error()) return fmt.Errorf("error while waiting for gitrepository to be ready: '%s'", err) } b.logger.Successf("GitRepsoitory reconciled successfully")