Skip to content

Commit

Permalink
Bugfix for download images to use default registry (#2506)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-cool-train authored Jun 22, 2022
1 parent f83da09 commit 35e2daa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ eks-anywhere-downloads*
hardware-manifests/
*.env
support-bundle*
/.ignore
/.ignore
7 changes: 6 additions & 1 deletion pkg/curatedpackages/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,14 @@ func fetchPackages(ctx context.Context, versionsBundle releasev1.VersionsBundle,
Description: p.Name,
OS: ctrl.OS,
OSName: ctrl.OSName,
URI: fmt.Sprintf("%s/%s:%s", p.Source.Registry, p.Source.Repository, p.Source.Versions[0].Name),
URI: fmt.Sprintf("%s/%s:%s", getDefaultRegistry(ctrl), p.Source.Repository, p.Source.Versions[0].Name),
}
images = append(images, pI)
}
return images, nil
}

func getDefaultRegistry(ctrl releasev1.Image) string {
registry := GetRegistry(ctrl.URI)
return registry
}

0 comments on commit 35e2daa

Please sign in to comment.