Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: pass the Chart version when listing images #945

Merged
merged 1 commit into from
Oct 15, 2024
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
7 changes: 5 additions & 2 deletions hack/tools/fetch-images/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const (
type ChartInfo struct {
repo string
name string
version string
valuesFile string
stringValues []string
extraImagesFiles []string
Expand Down Expand Up @@ -155,8 +156,9 @@ func getImagesForAddons(helmChartConfigMap, carenChartDirectory string) ([]strin
return nil, fmt.Errorf("failed to unmarshal chart info from configmap %w", err)
}
info := &ChartInfo{
name: settings.ChartName,
repo: settings.Repository,
name: settings.ChartName,
version: settings.Version,
repo: settings.Repository,
}
valuesFile, err := getValuesFileForChartIfNeeded(settings.ChartName, carenChartDirectory)
if err != nil {
Expand Down Expand Up @@ -320,6 +322,7 @@ func getValuesFileForChartIfNeeded(chartName, carenChartDirectory string) (strin
func getImagesForChart(info *ChartInfo) ([]string, error) {
images := pkg.Images{}
images.SetChart(info.name)
images.ChartVersionConstraint = info.version
images.RepoURL = info.repo
if info.valuesFile != "" {
_ = images.ValueFiles.Set(info.valuesFile)
Expand Down
Loading