Skip to content

Commit bfb68c9

Browse files
committed
remove logs
1 parent a02f378 commit bfb68c9

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

internal/controller/gateway_controller.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package controller
22

33
import (
44
"context"
5-
"encoding/json"
65
"fmt"
76
"reflect"
87

@@ -105,11 +104,10 @@ func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
105104
msg: err.Error(),
106105
}
107106
}
108-
byt, _ := json.Marshal(gateway.Spec)
109107
if err := r.ControlPlaneClient.Update(ctx, tctx, gateway); err != nil {
110108
acceptStatus = status{
111109
status: false,
112-
msg: fmt.Errorf("failed to update gateway: %w for gateway %s", err, string(byt)).Error(),
110+
msg: err.Error(),
113111
}
114112
}
115113

internal/controlplane/controlplane.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package controlplane
22

33
import (
44
"context"
5-
"encoding/json"
6-
"fmt"
75

86
"sigs.k8s.io/controller-runtime/pkg/client"
97
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
@@ -73,15 +71,13 @@ func (d *dashboardClient) Update(ctx context.Context, tctx *translator.Translate
7371
oldssl, err := d.c.Cluster(name).SSL().Get(ctx, ssl.Cert)
7472
if err != nil || oldssl == nil {
7573
if _, err := d.c.Cluster(name).SSL().Create(ctx, ssl); err != nil {
76-
byt, _ := json.Marshal(ssl.Snis)
77-
return fmt.Errorf("failed to create ssl with sni: %s: %w", string(byt), err)
74+
return err
7875
}
7976
} else {
8077
// array union is done to avoid host duplication
8178
ssl.Snis = arrayUnion(ssl.Snis, oldssl.Snis)
8279
if _, err := d.c.Cluster(name).SSL().Update(ctx, ssl); err != nil {
83-
byt, _ := json.Marshal(ssl.Snis)
84-
return fmt.Errorf("failed to update ssl with sni: %s: %w", string(byt), err)
80+
return err
8581
}
8682
}
8783
}

0 commit comments

Comments
 (0)