skip applying helm-release if app spec not change (#1461)

Signed-off-by: roywang <seiwy2010@gmail.com>
This commit is contained in:
Yue Wang
2021-04-11 15:47:00 +08:00
committed by GitHub
parent bc6a60dde2
commit 7edfbde2f5
@@ -154,8 +154,9 @@ func (h *appHandler) apply(ctx context.Context, appRev *v1beta1.ApplicationRevis
}
}
}
if comp.Spec.Helm != nil {
// TODO(wonderflow): do we still need to apply helm resource if the spec has no difference?
// isNewRevision indicates app's newly created or spec has changed
// skip applying helm resources if no spec change
if h.isNewRevision && comp.Spec.Helm != nil {
if err = h.applyHelmModuleResources(ctx, comp, owners); err != nil {
return errors.Wrap(err, "cannot apply Helm module resources")
}