Skip to content

Commit

Permalink
Improve naming on seed refs
Browse files Browse the repository at this point in the history
  • Loading branch information
Racer159 committed Sep 28, 2023
1 parent ab15ad4 commit 59f8cdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/internal/cluster/injector.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (c *Cluster) StopInjectionMadness() error {

func (c *Cluster) loadSeedImages(tempPath types.TempPaths, injectorSeedSrcs []string, spinner *message.Spinner) ([]transform.Image, error) {
seedImages := []transform.Image{}
refToDigest := make(map[string]string)
localReferenceToDigest := make(map[string]string)

// Load the injector-specific images and save them as seed-images
for _, src := range injectorSeedSrcs {
Expand All @@ -155,10 +155,10 @@ func (c *Cluster) loadSeedImages(tempPath types.TempPaths, injectorSeedSrcs []st
return seedImages, err
}
// This is done _without_ the domain (different from pull.go) since the injector only handles local images
refToDigest[ref.Path+ref.TagOrDigest] = imgDigest.String()
localReferenceToDigest[ref.Path+ref.TagOrDigest] = imgDigest.String()
}

if err := utils.AddImageNameAnnotation(tempPath.SeedImages, refToDigest); err != nil {
if err := utils.AddImageNameAnnotation(tempPath.SeedImages, localReferenceToDigest); err != nil {
return seedImages, fmt.Errorf("unable to format OCI layout: %w", err)
}

Expand Down

0 comments on commit 59f8cdb

Please sign in to comment.