(ctx devspacecontext.Context, dockerClient docker.Client, namespace, registryURL string)
| 22 | const AzureContainerRegistryUsername = "00000000-0000-0000-0000-000000000000" |
| 23 | |
| 24 | func (r *client) EnsurePullSecret(ctx devspacecontext.Context, dockerClient docker.Client, namespace, registryURL string) error { |
| 25 | pullSecret := &latest.PullSecretConfig{Registry: registryURL} |
| 26 | |
| 27 | // try to find in pull secrets |
| 28 | if ctx.Config() != nil && ctx.Config().Config() != nil { |
| 29 | for _, ps := range ctx.Config().Config().PullSecrets { |
| 30 | if ps.Registry == registryURL { |
| 31 | pullSecret = ps |
| 32 | break |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | return r.ensurePullSecret(ctx, dockerClient, namespace, pullSecret) |
| 38 | } |
| 39 | |
| 40 | func (r *client) ensurePullSecret(ctx devspacecontext.Context, dockerClient docker.Client, namespace string, pullSecretConf *latest.PullSecretConfig) error { |
| 41 | displayRegistryURL := pullSecretConf.Registry |
nothing calls this directly
no test coverage detected