karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.44k stars 880 forks source link

What's the usage of get_macos_ipaddress? Why necessary in mac? #5230

Closed vie-serendipity closed 2 months ago

vie-serendipity commented 2 months ago

Please provide an in-depth description of the question you have: This might be a newbie question. I want to know why get_macos_ipaddress is necessary in macos? What's the difference between linux and macos in this aspect? https://github.com/karmada-io/karmada/blob/bf2a6044a0de3a6219933dbd029e005cfaf7569c/hack/util.sh#L667C1-L669C39

What do you think about this question?:

Environment:

XiShanYongYe-Chang commented 2 months ago

/cc @lfbear @chaosi-zju

chaosi-zju commented 2 months ago

I am not much clear about the backgroud of get_macos_ipaddress.

But, the network does make a difference between linux and macos, you can refer to

That is, unlike Docker on Linux, Docker for macOS does not expose container networks directly on the macOS host.

However, I am not sure the get_macos_ipaddress function is a common way to resolve this problem, after all, if you use docker-mac-net-connect, you can mask the difference between the two on this issue.

vie-serendipity commented 2 months ago

@chaosi-zju I got it, thanks.