From bcf73d64bf5e04a40ed423556f74f37df917f9f7 Mon Sep 17 00:00:00 2001 From: Vegard Engen Date: Wed, 11 Jun 2025 10:13:48 +0200 Subject: [PATCH] Turn off logging for newly created portforward rules --- internal/controller/portforward_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controller/portforward_controller.go b/internal/controller/portforward_controller.go index 5034b22..698d1b1 100644 --- a/internal/controller/portforward_controller.go +++ b/internal/controller/portforward_controller.go @@ -133,7 +133,7 @@ func (r *PortForwardReconciler) Reconcile(ctx context.Context, req ctrl.Request) } } } else { - _, err := r.UnifiClient.Client.CreatePortForward(context.Background(), r.UnifiClient.SiteID, &goUnifi.PortForward{Name: portforwardname, PfwdInterface: "wan", Src: "any", Log: true, DestinationIPs: []goUnifi.PortForwardDestinationIPs{}, Enabled: true, Fwd: ip, DestinationIP: "any", Proto: "tcp", DstPort: fmt.Sprintf("%d", portMap[port.Name]), SiteID: r.UnifiClient.SiteID, FwdPort: fmt.Sprintf("%d", port.Port)}) + _, err := r.UnifiClient.Client.CreatePortForward(context.Background(), r.UnifiClient.SiteID, &goUnifi.PortForward{Name: portforwardname, PfwdInterface: "wan", Src: "any", Log: false, DestinationIPs: []goUnifi.PortForwardDestinationIPs{}, Enabled: true, Fwd: ip, DestinationIP: "any", Proto: "tcp", DstPort: fmt.Sprintf("%d", portMap[port.Name]), SiteID: r.UnifiClient.SiteID, FwdPort: fmt.Sprintf("%d", port.Port)}) if err != nil { log.Error(err, "Portforward could not be created") return ctrl.Result{RequeueAfter: 10 * time.Minute}, err