Skip to content

Commit

Permalink
Merge pull request #174 from intelops/issuefix
Browse files Browse the repository at this point in the history
Fixed the app installation issue
  • Loading branch information
vramk23 authored Mar 12, 2024
2 parents 1ea831e + 7bed7b4 commit 6535275
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/helm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 6535275

Please sign in to comment.