Pass management URL to ClusterProxy (#289)

The proxy container defaults `--management-url` to
`https://api.netbird.io`, so on self-hosted NetBird the proxy talks to
SaaS and rejects the setup key as invalid.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added support for configuring a management URL for the cluster proxy
service.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Luuk Blankenstijn
2026-06-09 14:55:34 +02:00
committed by GitHub
parent 048d3f3581
commit 13c7bba3f3
2 changed files with 7 additions and 3 deletions
+3 -2
View File
@@ -313,8 +313,9 @@ func main() {
os.Exit(1)
}
if err := (&controller.ClusterProxyReconciler{
Client: mgr.GetClient(),
ApiKey: netbirdAPIKey,
Client: mgr.GetClient(),
ApiKey: netbirdAPIKey,
ManagementURL: managementURL,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "Failed to create controller", "controller", "ClusterProxy")
os.Exit(1)
@@ -29,7 +29,8 @@ import (
type ClusterProxyReconciler struct {
client.Client
ApiKey string
ApiKey string
ManagementURL string
}
// +kubebuilder:rbac:groups=netbird.io,resources=clusterproxies,verbs=get;list;watch;create;update;patch;delete
@@ -124,6 +125,8 @@ func (r *ClusterProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request
clusterProxy.Spec.ClusterName,
"--kubernetes-api-server",
clusterProxy.Spec.APIServer,
"--management-url",
r.ManagementURL,
).
WithEnv(
corev1ac.EnvVar().