feat: add router namePrefix #80
Open
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.
Problem Statement
Managing multiple Kubernetes clusters with a single NetBird account made it hard to differentiate routing peers: every cluster created a peer named router, so the NetBird dashboard couldn’t tell them apart besides from groups. In addition, Kubernetes API exposure relied on DNS-only addresses, which collide across clusters and break access when multiple policies target the same DNS entry.
Key Updates
Added a configurable routing-peer name prefix (ingress.router.namePrefix → --routing-peer-name-prefix) and plumbed it through the Service controller so each cluster (or namespace, if namespaced networks are enabled) can build unique peer names such as -router.
Updated Helm values, deployment args, docs, and examples to surface the new option, plus added controller logging/tests around the behavior.
Enhanced the Kubernetes API NBResource job to accept explicit IP addresses (cluster.apiserver) so networks can target unique endpoints per cluster instead of sharing the default DNS entry.
Fixed template rendering issues (groups indentation) to ensure Helm hooks apply cleanly when custom group lists are provided.