devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Kubernetes provider not working with insecure registries

Open lizardruss opened this issue 1 year ago • 0 comments

What happened? Currently receiving the following error when DevPod attempts to push an image to an insecure registry:

debug DeadlineExceeded: failed to push dockerregistry.some.hostname.com/my-project:devpod-6194100ffa818a3e0caa3175bae66de9: failed to do request: Head "https://dockerregistry.some.hostname.com/v2/my-project/blobs/sha256:f4a222a09f4768c29df49b900126c48e4f506238a7a569a6645d0756e18a2173": dial tcp 10.125.4.34:443: i/o timeout

The registry has been configured as insecure in ~/.docker/config.json, and the BUILD_REPOSITORY is configured as dockerregistry.some.hostname.com/my-project.

In addition, building and pushing to the registry works as expected when using the Docker CLI

What did you expect to happen instead? The image should build and push successfully and the DevPod should start.

How can we reproduce the bug? (as minimally and precisely as possible) Configure a local, insecure image registry, and use the kubernetes provider to create a DevPod.

Local Environment:

  • DevPod Version: latest

DevPod Provider:

  • Kubernetes Provider

Anything else we need to know? The issue is with a 3rd party library that always assumes a secure registry is used when parsing the registry reference, for example, the lines below would output https instead of http:

ref, _ := name.ParseReference("http://dockerregistry.some.hostname.com/my-project")
fmt.Println(ref.Context().Registry.Scheme())

Slack thread where this issue was reported.

lizardruss avatar Jun 12 '23 20:06 lizardruss