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

Hotfix: updates of autodetected images in HelmReleases #2400

Merged
merged 1 commit into from
Aug 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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