From f9aa2c196b3d7b0e6878cf115bc33e070d5dd4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cirisdingbj=E2=80=9D?= Date: Thu, 5 Dec 2019 17:44:08 +0800 Subject: [PATCH] Return error to reconciler when process manifest fails --- pkg/helmreconciler/reconciler.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/helmreconciler/reconciler.go b/pkg/helmreconciler/reconciler.go index b7e75914e..5e98bae6a 100644 --- a/pkg/helmreconciler/reconciler.go +++ b/pkg/helmreconciler/reconciler.go @@ -15,6 +15,7 @@ package helmreconciler import ( + "fmt" "sync" "k8s.io/apimachinery/pkg/runtime" @@ -115,7 +116,11 @@ func (h *HelmReconciler) Reconcile() error { errs = util.AppendErr(errs, h.customizer.Listener().EndPrune()) errs = util.AppendErr(errs, h.customizer.Listener().EndReconcile(h.instance, status)) - + for _, v := range status.Status { + if v.Error != "" { + errs = util.AppendErr(errs, fmt.Errorf(v.Error+"\n")) + } + } return errs.ToError() }