Skip to content

Conversation

@fahrishih
Copy link

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.

Copy link
Collaborator

@mohamed-essam mohamed-essam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fahrishih ,

Thanks for your contribution, due to a recent migration you will need to rebase some of your helm work to go with the helm chart separation effort (basically moved any NB* resources out of the operator chart to a separate configuration chart to streamline uninstallation).

I also added a review comment that's causing the tests to fail

}

func (r *ServiceReconciler) routingPeerName() string {
return fmt.Sprintf("%s-%s", r.RouterNamePrefix, routingPeerBaseName)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing the router name to be -router when prefix is empty

Suggested change
return fmt.Sprintf("%s-%s", r.RouterNamePrefix, routingPeerBaseName)
if r.RouterNamePrefix == "" {
return routingPeerBaseName
}
return fmt.Sprintf("%s-%s", r.RouterNamePrefix, routingPeerBaseName)

@fahrishih
Copy link
Author

sure @mohamed-essam , the new version had some release errors, im waiting for that to be resolved first before updating this MR. https://github.com/netbirdio/kubernetes-operator/actions/runs/19680284318/job/56372264995

@dfry
Copy link
Contributor

dfry commented Nov 27, 2025

looking forward to this PR

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.

3 participants