Skip to content

Commit a644a99

Browse files
authored
Merge pull request #2428 from FabianKramm/main
Improve output for pull secret creation & dependency bump
2 parents 3051e61 + 91960ce commit a644a99

14 files changed

Lines changed: 140 additions & 51 deletions

File tree

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ require (
99
github.com/bmatcuk/doublestar v1.1.1
1010
github.com/compose-spec/compose-go v1.2.2
1111
github.com/creack/pty v1.1.17
12-
github.com/docker/cli v20.10.17+incompatible
12+
github.com/docker/cli v20.10.21+incompatible
1313
github.com/docker/distribution v2.8.1+incompatible
14-
github.com/docker/docker v20.10.17+incompatible
14+
github.com/docker/docker v20.10.21+incompatible
1515
github.com/docker/go-connections v0.4.0
1616
github.com/evanphx/json-patch v4.12.0+incompatible
1717
github.com/evanphx/json-patch/v5 v5.1.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyG
362362
github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
363363
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
364364
github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
365-
github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M=
366-
github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
365+
github.com/docker/cli v20.10.21+incompatible h1:qVkgyYUnOLQ98LtXBrwd/duVqPT2X4SHndOuGsfwyhU=
366+
github.com/docker/cli v20.10.21+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
367367
github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
368368
github.com/docker/distribution v2.6.0-rc.1.0.20180327202408-83389a148052+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
369369
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
@@ -375,8 +375,8 @@ github.com/docker/docker v1.4.2-0.20180531152204-71cd53e4a197/go.mod h1:eEKB0N0r
375375
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
376376
github.com/docker/docker v17.12.0-ce-rc1.0.20200730172259-9f28837c1d93+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
377377
github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
378-
github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE=
379-
github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
378+
github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog=
379+
github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
380380
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y=
381381
github.com/docker/docker-credential-helpers v0.6.4 h1:axCks+yV+2MR3/kZhAmy07yC56WZ2Pwu/fKWtKuZB0o=
382382
github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c=

pkg/devspace/pullsecrets/init.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (r *client) createPullSecret(ctx devspacecontext.Context, dockerClient dock
165165
username := pullSecret.Username
166166
password := pullSecret.Password
167167
if username == "" && password == "" && dockerClient != nil {
168-
authConfig, _ := dockerClient.GetAuthConfig(ctx.Context(), pullSecret.Registry, true)
168+
authConfig, err := dockerClient.GetAuthConfig(ctx.Context(), pullSecret.Registry, true)
169169
if authConfig != nil {
170170
username = authConfig.Username
171171
password = authConfig.Password
@@ -179,6 +179,8 @@ func (r *client) createPullSecret(ctx devspacecontext.Context, dockerClient dock
179179
if username == "" && IsAzureContainerRegistry(authConfig.ServerAddress) {
180180
username = AzureContainerRegistryUsername
181181
}
182+
} else if err != nil {
183+
ctx.Log().Debugf("Error retrieving docker credentials for registry %s: %v", pullSecret.Registry, err)
182184
}
183185
}
184186

@@ -199,6 +201,13 @@ func (r *client) createPullSecret(ctx devspacecontext.Context, dockerClient dock
199201
if err != nil {
200202
return err
201203
}
204+
} else {
205+
if username == "" {
206+
ctx.Log().Warnf("Couldn't retrieve username for registry %s from docker store", pullSecret.Registry)
207+
}
208+
if password == "" {
209+
ctx.Log().Warnf("Couldn't retrieve password for registry %s from docker store", pullSecret.Registry)
210+
}
202211
}
203212

204213
return nil

vendor/github.com/docker/cli/cli/config/credentials/native_store.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/api/swagger.yaml

Lines changed: 53 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/builder/remotecontext/git/gitutils.go

Lines changed: 45 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/client/client.go

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/client/request.go

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/pkg/archive/archive_unix.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/docker/docker/pkg/archive/copy.go

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)