Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

(feature): update kind-registry port forwarding #4554

Merged
merged 2 commits into from
Feb 24, 2022

Conversation

schristoff
Copy link
Contributor

Description: In recent versions of Docker for Mac there is a translation issue when talking to the registry at localhost - this issue does not appear to occur when using 127.0.0.1 - here is a relevant issue on this.

Testing done: While running Docker 4.5.0 I was unable to communicate to the registry at localhost, only via 127.0.0.1 - I uninstalled 4.5.0, installed 4.0.0 and no longer had the localhost issue. I added these changes and ran make kind-demo successfully.

Affected area:

Functional Area
New Functionality [ ]
CI System [ ]
CLI Tool [ ]
Certificate Management [ ]
Control Plane [ ]
Demo [ X]
Documentation [ ]
Egress [ ]
Ingress [ ]
Install [ ]
Networking [ ]
Observability [ ]
Performance [ ]
SMI Policy [ ]
Security [ ]
Sidecar Injection [ ]
Tests [ ]
Upgrade [ ]
Other [ ]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project?
    • Did you notify the maintainers and provide attribution?
      no
  2. Is this a breaking change?
    no
  3. Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?
  4. n/a

.env.example Outdated Show resolved Hide resolved
Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reasonable change, but I'm running Docker desktop 4.5.0 and not seeing this issue, so let's not conclude that's the issue just yet.

scripts/kind-with-registry.sh Outdated Show resolved Hide resolved
.env.example Outdated Show resolved Hide resolved
demo/get-multicluster-envoy-configs.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea to try this came from kind's script that this is based on where this same change was recently made to prevent the registry from being accessible outside localhost: https://kind.sigs.k8s.io/docs/user/local-registry/

This also fixes an issue I had on my Mac where I would need to docker network disconnect kind kind-registry to be able to push to the registry and then docker network connect kind kind-registry for the cluster to be able to pull from the registry.

I didn't figure out exactly why this fixes the issue, but I noticed prior to this change:

$ docker port kind-registry
5000/tcp -> 0.0.0.0:5000
5000/tcp -> :::5000

and after this change:

$ docker port kind-registry
5000/tcp -> 127.0.0.1:5000

Changing the added 127.0.0.1 to 0.0.0.0 also fixed my particular issue.

I suspect it has something to do with docker push/pull using ipv6 and that not propagating through to the registry properly since curl never had a problem accessing it via localhost.

@schristoff Can you update the title/description to reflect that this doesn't seem like an issue with any particular version or distribution of Docker? At least I don't think we know enough to be able to make that claim just yet.
Looking at it again, I think what's there is good.

@schristoff schristoff changed the title (feature): Add support for Docker for Mac 4.0.0+ (feature): update kind-registry port forwarding Feb 23, 2022
@schristoff schristoff force-pushed the schristoff_suppDocker4 branch from 274c890 to ee2631d Compare February 23, 2022 23:10
Signed-off-by: Sarah Christoff <[email protected]>
Signed-off-by: Sarah Christoff <[email protected]>
@schristoff schristoff force-pushed the schristoff_suppDocker4 branch from ee2631d to b2958de Compare February 23, 2022 23:12
@jaellio jaellio merged commit 28e3409 into openservicemesh:main Feb 24, 2022
@schristoff schristoff deleted the schristoff_suppDocker4 branch February 24, 2022 19:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants