mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Share Netbird client between all reconcilers (#122)
This changes the reconcilers to take a netbird client rather than creating their own on setup. Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
@@ -85,7 +85,7 @@ var _ = Describe("NBGroup Controller", func() {
|
||||
By("Reconciling the created resource")
|
||||
controllerReconciler := &NBGroupReconciler{
|
||||
Client: k8sClient,
|
||||
netbird: netbirdClient,
|
||||
Netbird: netbirdClient,
|
||||
}
|
||||
|
||||
mux.HandleFunc("/api/groups", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -123,7 +123,7 @@ var _ = Describe("NBGroup Controller", func() {
|
||||
By("Reconciling the created resource")
|
||||
controllerReconciler := &NBGroupReconciler{
|
||||
Client: k8sClient,
|
||||
netbird: netbirdClient,
|
||||
Netbird: netbirdClient,
|
||||
}
|
||||
|
||||
mux.HandleFunc("/api/groups", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -172,7 +172,7 @@ var _ = Describe("NBGroup Controller", func() {
|
||||
By("Reconciling the deleting resource")
|
||||
controllerReconciler := &NBGroupReconciler{
|
||||
Client: k8sClient,
|
||||
netbird: netbirdClient,
|
||||
Netbird: netbirdClient,
|
||||
}
|
||||
|
||||
method := ""
|
||||
@@ -198,7 +198,7 @@ var _ = Describe("NBGroup Controller", func() {
|
||||
By("Reconciling the deleting resource")
|
||||
controllerReconciler := &NBGroupReconciler{
|
||||
Client: k8sClient,
|
||||
netbird: netbirdClient,
|
||||
Netbird: netbirdClient,
|
||||
}
|
||||
|
||||
method := ""
|
||||
@@ -239,7 +239,7 @@ var _ = Describe("NBGroup Controller", func() {
|
||||
By("Reconciling the deleting resource")
|
||||
controllerReconciler := &NBGroupReconciler{
|
||||
Client: k8sClient,
|
||||
netbird: netbirdClient,
|
||||
Netbird: netbirdClient,
|
||||
}
|
||||
|
||||
method := ""
|
||||
@@ -266,7 +266,7 @@ var _ = Describe("NBGroup Controller", func() {
|
||||
It("should re-use existing group ID", func() {
|
||||
controllerReconciler := &NBGroupReconciler{
|
||||
Client: k8sClient,
|
||||
netbird: netbirdClient,
|
||||
Netbird: netbirdClient,
|
||||
}
|
||||
|
||||
mux.HandleFunc("/api/groups", func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -303,7 +303,7 @@ var _ = Describe("NBGroup Controller", func() {
|
||||
It("Should requeue and create group on next run", func() {
|
||||
controllerReconciler := &NBGroupReconciler{
|
||||
Client: k8sClient,
|
||||
netbird: netbirdClient,
|
||||
Netbird: netbirdClient,
|
||||
}
|
||||
|
||||
mux.HandleFunc("/api/groups", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user