Open
Conversation
Android Tailscale clients register with hostname "localhost", which breaks DNS resolution when machines have search domains (e.g. search .kpv.vpn) causing localhost to resolve to the Android device's tailnet IP instead of 127.0.0.1. Adds an opt-in CronJob that periodically checks for nodes with forbidden hostnames and renames them to <name>-<node-id> (e.g. localhost-12345). Includes independent RBAC (works without the in-cluster client enabled). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This is a workaround that will be removed once Headscale gains native support for rejecting or renaming nodes with forbidden hostnames. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
forbiddenNodeNames.enabled: true) that periodically renames nodes registered with forbidden hostnames (default:localhost)search .kpv.vpnare in play —localhostresolves to the Android device's tailnet IP instead of127.0.0.1<original-name>-<node-id>(e.g.localhost-12345) — unique and preserves origin for debuggingConfiguration
Test plan
helm templatewithforbiddenNodeNames.enabled=false(default) produces no forbidden-names resourceshelm templatewithforbiddenNodeNames.enabled=truerenders CronJob, ConfigMap, ServiceAccount, Role, RoleBindingnames: [localhost, android])🤖 Generated with Claude Code