Enable Windows CGO cross-compilation in release workflow#391
Merged
Conversation
- Install MinGW in GitHub Actions for Windows CGO builds. - Add separate GoReleaser configuration for Windows with CGO enabled. - Configure native DNS resolution for Windows builds to resolve VPN DNS routing issues. - Document exclusion of Windows builds from Docker images.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #391 +/- ##
==========================================
+ Coverage 81.12% 81.13% +0.01%
==========================================
Files 70 70
Lines 12665 12665
==========================================
+ Hits 10274 10276 +2
+ Misses 1986 1985 -1
+ Partials 405 404 -1 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #390 - Windows users with VPN connections couldn't connect to clusters when the API server hostname required VPN-specific DNS resolution.
The root cause: Go 1.24's pure-Go DNS resolver (used with
CGO_ENABLED=0) doesn't respect Windows per-adapter DNS settings. When we upgraded from Go 1.18 to 1.24 in v1.23.0, this broke DNS resolution for users on VPNs with custom DNS servers.Changes
kubefwd- Linux/macOS withCGO_ENABLED=0(static binaries for Alpine)kubefwd-windows- Windows withCGO_ENABLED=1(native DNS via Windows API)x86_64-w64-mingw32-gcc(amd64) andi686-w64-mingw32-gcc(386)Testing