diff --git a/pkg/helm/client.go b/pkg/helm/client.go index 006b99a..2a959bb 100644 --- a/pkg/helm/client.go +++ b/pkg/helm/client.go @@ -86,6 +86,7 @@ func (h *Client) Install(ctx context.Context, appConfig *types.AppConfig) (alrea } alreadyInstalled, err = h.isAppInstalled(actionConfig, appConfig.ReleaseName) + if err != nil { return } @@ -210,6 +211,12 @@ func (h *Client) isAppInstalled(actionConfig *action.Configuration, releaseName for _, release := range releases { if strings.EqualFold(release.Name, releaseName) { + if release.Info.Status == "deployed" { + return true, nil + } else if release.Info.Status == "failed" { + return false, nil + } + return true, nil } }