kuberlr icon indicating copy to clipboard operation
kuberlr copied to clipboard

Build kuberlr releases with CGO_ENABLED=1

Open jandubois opened this issue 2 years ago • 3 comments

The Go runtime only has a limited DNS resolver that does not support e.g. split-DNS configuration with a corporate VPN setup.

This doesn't matter much on Linux, where things are handled by 127.0.0.53 (systemd-resolved), but on macOS (and I think Windows) using the native resolver would be much preferable.

jandubois avatar Jul 22 '22 22:07 jandubois

Wouldn't that make the final binary less portable?

flavio avatar Aug 02 '22 07:08 flavio

Wouldn't that make the final binary less portable?

Sorry, was just on vacation most of August. 😄

I think portability is only an issue on Linux; I would expect things to just work on macOS and Windows, even when you build with CGO_ENABLED=1. Given that this isn't needed on systems using systemd-resolved I think it makes sense to compile the Linux version with CGO_ENABLED=0 as before.

We can build our own binaries for Rancher Desktop if you want to keep things as they are, but it would be easier for us if we can just download bits from your releases page...

jandubois avatar Aug 31 '22 00:08 jandubois

I looks like goreleaser and CGO=1 is not that easy... https://goreleaser.com/cookbooks/cgo-and-crosscompiling/

However, I would be fine to have only linux built with CGO disabled, as long as you can verify that everything works fine with Windwos and macOS

flavio avatar Aug 31 '22 16:08 flavio