Skip to content

Commit 8ee0c5a

Browse files
Allow sending credentials to namespace systems registries (#1381)
1 parent b21d00b commit 8ee0c5a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

internal/cli/cmd/cluster/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ func startSingleBuild(eg *executor.Executor, c *client.Client, mw *progresswrite
497497
type keychain struct{}
498498

499499
func (dk keychain) Resolve(ctx context.Context, r authn.Resource) (authn.Authenticator, error) {
500-
if strings.HasSuffix(r.RegistryStr(), ".nscluster.cloud") || r.RegistryStr() == "nscr.io" {
500+
if strings.HasSuffix(r.RegistryStr(), ".nscluster.cloud") || strings.HasSuffix(r.RegistryStr(), ".namespace.systems") || r.RegistryStr() == "nscr.io" {
501501
return api.RegistryCreds(ctx)
502502
}
503503

internal/providers/nscloud/api/creds.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var DefaultKeychain oci.Keychain = defaultKeychain{}
1717
type defaultKeychain struct{}
1818

1919
func (dk defaultKeychain) Resolve(ctx context.Context, r authn.Resource) (authn.Authenticator, error) {
20-
if strings.HasSuffix(r.RegistryStr(), ".nscluster.cloud") || r.RegistryStr() == "nscr.io" {
20+
if strings.HasSuffix(r.RegistryStr(), ".nscluster.cloud") || strings.HasSuffix(r.RegistryStr(), ".namespace.systems") || r.RegistryStr() == "nscr.io" {
2121
return RegistryCreds(ctx)
2222
}
2323

internal/providers/nscloud/buildcluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"namespacelabs.dev/foundation/internal/providers/nscloud/api"
1212
)
1313

14-
func EnsureBuildCluster(ctx context.Context, x api.API) (*buildkit.Overrides, error) {
14+
func EnsureBuildCluster(ctx context.Context, _ api.API) (*buildkit.Overrides, error) {
1515
cfg, err := api.EnsureBuildCluster(ctx, "amd64")
1616
if err != nil {
1717
return nil, err

internal/providers/nscloud/registry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"namespacelabs.dev/foundation/std/tasks"
1818
)
1919

20-
var DefaultKeychain oci.Keychain = api.DefaultKeychain
20+
var DefaultKeychain = api.DefaultKeychain
2121

2222
type nscloudRegistry struct {
2323
registry *api.ImageRegistry

0 commit comments

Comments
 (0)