Skip to content

Commit

Permalink
Add release namespace to Helm-related errors (#93)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Suderman <[email protected]>
  • Loading branch information
juniorz and Andrew Suderman authored Jun 30, 2020
1 parent 49e7086 commit 20f146d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/helm/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ func (h *Helm) getReleasesVersionTwo() error {
}
deployed, err := helmClient.Deployed(release.Name)
if err != nil {
klog.Infof("cannot determine most recent deployed for %s - %s", release.Name, err)
klog.Infof("cannot determine most recent deployed for %s/%s - %s", release.Namespace, release.Name, err)
continue
}
if release.Version != deployed.Version {
continue
}
rel, err := helmToRelease(release)
if err != nil {
return fmt.Errorf("error converting helm release '%s' to internal object\n %w", release.Name, err)
return fmt.Errorf("error converting helm release '%s/%s' to internal object\n %w", release.Namespace, release.Name, err)
}
h.Releases = append(h.Releases, rel)
}
Expand All @@ -140,15 +140,15 @@ func (h *Helm) getReleasesVersionThree() error {
for _, release := range list {
deployed, err := helmClient.Deployed(release.Name)
if err != nil {
klog.Infof("cannot determine most recent deployed for %s - %s", release.Name, err)
klog.Infof("cannot determine most recent deployed for %s/%s - %s", release.Namespace, release.Name, err)
continue
}
if release.Version != deployed.Version {
continue
}
rel, err := helmToRelease(release)
if err != nil {
return fmt.Errorf("error converting helm release '%s' to internal object\n %w", release.Name, err)
return fmt.Errorf("error converting helm release '%s/%s' to internal object\n %w", release.Namespace, release.Name, err)
}
h.Releases = append(h.Releases, rel)
}
Expand All @@ -163,7 +163,7 @@ func (h *Helm) findVersions() error {
klog.V(2).Infof("parsing release %s", release.Name)
outList, err := h.checkForAPIVersion([]byte(release.Manifest))
if err != nil {
return fmt.Errorf("error parsing release '%s'\n %w", release.Name, err)
return fmt.Errorf("error parsing release '%s/%s'\n %w", release.Namespace, release.Name, err)
}
for _, out := range outList {
out.Name = release.Name + "/" + out.Name
Expand Down

0 comments on commit 20f146d

Please sign in to comment.