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

Darwin CLI should be built with CGO_ENABLE=1 and/or GODEBUG=netdns=cgo #1079

Closed
pierretasci opened this issue Jul 20, 2020 · 4 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Milestone

Comments

@pierretasci
Copy link

Versions and Operating System

  • Kubernetes version: any

  • Tekton Pipeline version: any

  • Operating System: MacOS

Expected Behavior

When using a VPN on MacOS as many corporations do (especially in a remote environment), tkn is able to perform all functions against a Kubernetes cluster.

Actual Behavior

When using a split-tunnel VPN with custom rules, tkn will fail to resolve the host.

Additional Info

Because of how go's netdns resolver works, the go implementation doesn't necessarily work with Darwin's dns resolver chain. Instead, it would need to use the cgo version as that uses the OS's resolvers which is how most VPNs configure their custom tunnel rules when there is a split tunnel. For reference, when kubectl distributes itself via homebrew, it compiles with CGO_ENABLE=1: kubernetes/release#469

I believe the fix here is to cross-compile with cgo enabled for the binary that is deployed to homebrew There are potential cross-compilation problems here so there is an alternative which is to force the issue and build the code using GODEBUG=netdns=cgo which will also force go to use the cgo dns resolver.

@pierretasci pierretasci added the kind/bug Categorizes issue or PR as related to a bug. label Jul 20, 2020
@chmouel chmouel added this to the 0.12.0 milestone Jul 28, 2020
@danielhelfand danielhelfand modified the milestones: 0.12.0, 0.13.0 Aug 26, 2020
@piyush-garg piyush-garg modified the milestones: 0.13.0, 0.14.0 Oct 20, 2020
@vdemeester vdemeester modified the milestones: 0.14.0, 0.15.0, 0.16.0 Dec 15, 2020
@piyush-garg piyush-garg modified the milestones: 0.16.0, 0.17.0 Feb 16, 2021
@tekton-robot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 17, 2021
@vdemeester
Copy link
Member

/lifecycle frozen

@tekton-robot tekton-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 17, 2021
@piyush-garg piyush-garg modified the milestones: 0.17.0, 0.22.0 Nov 29, 2021
@piyush-garg piyush-garg modified the milestones: 0.22.0, 0.23.0 Mar 9, 2022
@vdemeester vdemeester removed this from the 0.23.0 milestone May 3, 2022
@piyush-garg piyush-garg added this to the 0.27.0 milestone Sep 19, 2022
@piyush-garg piyush-garg modified the milestones: 0.27.0, 0.28.0 Nov 23, 2022
piyush-garg added a commit to piyush-garg/cli that referenced this issue Nov 23, 2022
This will make darwin to build with CGO_ENABLED
to work fine with proxy and vpn

Fix tektoncd#1079
@piyush-garg piyush-garg self-assigned this Nov 23, 2022
@piyush-garg piyush-garg modified the milestones: 0.28.0, 0.30.0 Jan 5, 2023
@chmouel
Copy link
Member

chmouel commented Feb 2, 2023

This should be solved for "free" with go 1.20 fyi :

https://danp.net/posts/macos-dns-change-in-go-1-20/

@piyush-garg piyush-garg modified the milestones: 0.30.0, 0.31.0 Mar 28, 2023
@piyush-garg piyush-garg modified the milestones: 0.31.0, 1.0.0 🦁, 0.32.0 Apr 14, 2023
@piyush-garg piyush-garg modified the milestones: 0.32.0, 0.33.0 Aug 29, 2023
@piyush-garg piyush-garg modified the milestones: 0.33.0, 0.34.0 Nov 21, 2023
@piyush-garg
Copy link
Contributor

We have done 0.33 release with go 1.20, closing this now

@piyush-garg piyush-garg modified the milestones: 0.34.0, 0.33.0 Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants