MCPcopy Index your code
hub / github.com/devspace-sh/devspace / EnsurePullSecret

Method EnsurePullSecret

pkg/devspace/pullsecrets/init.go:24–38  ·  view source on GitHub ↗
(ctx devspacecontext.Context, dockerClient docker.Client, namespace, registryURL string)

Source from the content-addressed store, hash-verified

22const AzureContainerRegistryUsername = "00000000-0000-0000-0000-000000000000"
23
24func (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
40func (r *client) ensurePullSecret(ctx devspacecontext.Context, dockerClient docker.Client, namespace string, pullSecretConf *latest.PullSecretConfig) error {
41 displayRegistryURL := pullSecretConf.Registry

Callers

nothing calls this directly

Calls 2

ensurePullSecretMethod · 0.95
ConfigMethod · 0.65

Tested by

no test coverage detected