Skip to content

Commit 916399c

Browse files
committed
build: pass the Chart version when listing images
1 parent 34b696c commit 916399c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

hack/tools/fetch-images/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const (
3434
type ChartInfo struct {
3535
repo string
3636
name string
37+
version string
3738
valuesFile string
3839
stringValues []string
3940
extraImagesFiles []string
@@ -155,8 +156,9 @@ func getImagesForAddons(helmChartConfigMap, carenChartDirectory string) ([]strin
155156
return nil, fmt.Errorf("failed to unmarshal chart info from configmap %w", err)
156157
}
157158
info := &ChartInfo{
158-
name: settings.ChartName,
159-
repo: settings.Repository,
159+
name: settings.ChartName,
160+
version: settings.Version,
161+
repo: settings.Repository,
160162
}
161163
valuesFile, err := getValuesFileForChartIfNeeded(settings.ChartName, carenChartDirectory)
162164
if err != nil {
@@ -320,6 +322,7 @@ func getValuesFileForChartIfNeeded(chartName, carenChartDirectory string) (strin
320322
func getImagesForChart(info *ChartInfo) ([]string, error) {
321323
images := pkg.Images{}
322324
images.SetChart(info.name)
325+
images.ChartVersionConstraint = info.version
323326
images.RepoURL = info.repo
324327
if info.valuesFile != "" {
325328
_ = images.ValueFiles.Set(info.valuesFile)

0 commit comments

Comments
 (0)