Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile release binaries with CGO_ENABLED=1 for macos DNS resolution #969

Closed
mvgijssel opened this issue Aug 28, 2020 · 3 comments
Closed

Comments

@mvgijssel
Copy link

Description

Using terraform-provider-kubernetes on macos I run into the issue of hashicorp/terraform#3536 where the plugin cannot find my kubernetes cluster. If I compile the plugin with the CGO_ENABLED=1 on macos the plugin works as expected.

There's a cool repository which enables cross comping golang projects using a docker container https://github.com/crazy-max/xgo. Running the following commands resulted in a working binary with improved macos dns resolution:

git clone https://github.com/hashicorp/terraform-provider-kubernetes.git
go get github.com/crazy-max/xgo
xgo --targets=darwin/amd64 terraform-provider-kubernetes

Because it's using docker this should be pretty simple to implement in a CI job!

References

hashicorp/terraform#3536
https://github.com/crazy-max/xgo

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@mvgijssel
Copy link
Author

Anybody running into this should check out https://github.com/greenboxal/dns-heaven, which fixes the DNS resolution for golang programs (and others) compiled with CGO_ENABLED=0!

@aareet
Copy link
Contributor

aareet commented Sep 30, 2020

Thanks for this @mvgijssel, we'll need to explore a solution that works for all our providers without any other side effects in order to make this shift. Tagging this as upstream so the solution can be explored at that level.

@aareet aareet closed this as completed Sep 30, 2020
@ghost
Copy link

ghost commented Oct 31, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Oct 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants