mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
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:
+3
-2
@@ -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().
|
||||
|
||||
Reference in New Issue
Block a user