Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Hotfix: updates of autodetected images in HelmReleases (#2400)
Browse files Browse the repository at this point in the history
Hotfix: updates of autodetected images in HelmReleases
  • Loading branch information
hiddeco authored Aug 22, 2019
2 parents fabc238 + 4fd6f11 commit b73eb7e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cluster/kubernetes/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,18 @@ func (m *manifests) SetWorkloadContainerImage(def []byte, id resource.ID, contai
// map for the given container to perform an update based on mapped YAML
// dot notation paths. If resolving the map fails (either because there
// is no map for the given container, or the mapping does not resolve
// in to a valid image ref), it returns the error.
// in to a valid image ref), it falls through and attempts to update
// using just the container name (as it must origin from an automated
// detection).
//
// NB: we do this here and not in e.g. the `resource` package, to ensure
// everything _outside_ this package only knows about Kubernetes native
// containers, and not the dot notation YAML paths we invented for custom
// Helm value structures.
if hr, ok := res.(*kresource.HelmRelease); ok {
paths, err := hr.GetContainerImageMap(container)
if err != nil {
return nil, err
if paths, err := hr.GetContainerImageMap(container); err == nil {
return updateWorkloadImagePaths(def, id, paths, image)
}
return updateWorkloadImagePaths(def, id, paths, image)
}
return updateWorkloadContainer(def, id, container, image)
}
Expand Down

0 comments on commit b73eb7e

Please sign in to comment.