Skip to content

Commit

Permalink
chore: support gcr.io auth for cache and image gen
Browse files Browse the repository at this point in the history
Support gcr.io auth for cache and image gen.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Dec 19, 2024
1 parent 6ef2596 commit f756043
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/imager/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/cache"
"github.com/google/go-containerregistry/pkg/v1/empty"
"github.com/google/go-containerregistry/pkg/v1/google"
"github.com/google/go-containerregistry/pkg/v1/layout"
"github.com/google/go-containerregistry/pkg/v1/mutate"
"github.com/google/go-containerregistry/pkg/v1/remote"
Expand Down Expand Up @@ -87,6 +88,7 @@ func Generate(images []string, platform string, insecure bool, imageLayerCachePa
authn.NewMultiKeychain(
authn.DefaultKeychain,
github.Keychain,
google.Keychain,
),
),
}
Expand All @@ -95,6 +97,7 @@ func Generate(images []string, platform string, insecure bool, imageLayerCachePa
remote.WithAuthFromKeychain(authn.NewMultiKeychain(
authn.DefaultKeychain,
github.Keychain,
google.Keychain,
)),
remote.WithPlatform(*v1Platform),
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/imager/profile/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/google/go-containerregistry/pkg/authn/github"
"github.com/google/go-containerregistry/pkg/crane"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/google"
"github.com/google/go-containerregistry/pkg/v1/layout"
"github.com/siderolabs/gen/value"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -280,6 +281,7 @@ func (c *ContainerAsset) Pull(ctx context.Context, arch string, printf func(stri
authn.NewMultiKeychain(
authn.DefaultKeychain,
github.Keychain,
google.Keychain,
),
),
}
Expand Down

0 comments on commit f756043

Please sign in to comment.