Skip to content

fix: only rewrite a WSL worker's apiserver address when it is unreachable - #140

Merged
hsluoyz merged 1 commit into
casosorg:masterfrom
bugkeep:fix/preserve-reachable-worker-apiserver
Aug 9, 2026
Merged

fix: only rewrite a WSL worker's apiserver address when it is unreachable#140
hsluoyz merged 1 commit into
casosorg:masterfrom
bugkeep:fix/preserve-reachable-worker-apiserver

Conversation

@bugkeep

@bugkeep bugkeep commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • probe the configured API server endpoint from a WSL worker before rewriting it
  • keep an already reachable endpoint unchanged
  • fall back to the WSL default gateway only when the configured endpoint is unreachable

Why

The previous resolver unconditionally replaced the API server host with the target WSL default gateway. When the configured endpoint already points to a reachable control plane address, this writes the wrong server URL into the worker kubeconfig and prevents the worker from joining the cluster.

Validation

  • go test ./...
  • go test ./deploy -count=1
  • go vet ./deploy
  • focused local tests for both the reachable-endpoint and gateway-fallback paths

No matching issue was found.

@hsluoyz hsluoyz changed the title fix: preserve reachable worker apiserver URL fix: only rewrite a WSL worker's apiserver address when it is unreachable Aug 9, 2026
@hsluoyz
hsluoyz merged commit 825aeb7 into casosorg:master Aug 9, 2026
6 of 7 checks passed
@bugkeep
bugkeep deleted the fix/preserve-reachable-worker-apiserver branch August 19, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants