Skip to content

Commit 2e438cc

Browse files
committed
add logs
1 parent 54c9c7d commit 2e438cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/controlplane/controlplane.go

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

33
import (
44
"context"
5+
"fmt"
56

67
"sigs.k8s.io/controller-runtime/pkg/client"
78
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
@@ -71,13 +72,13 @@ func (d *dashboardClient) Update(ctx context.Context, tctx *translator.Translate
7172
oldssl, err := d.c.Cluster(name).SSL().Get(ctx, ssl.Cert)
7273
if err != nil || oldssl == nil {
7374
if _, err := d.c.Cluster(name).SSL().Create(ctx, ssl); err != nil {
74-
return err
75+
return fmt.Errorf("failed to create ssl for sni %+v: %w", ssl.Snis, err)
7576
}
7677
} else {
7778
// array union is done to avoid host duplication
7879
ssl.Snis = arrayUnion(ssl.Snis, oldssl.Snis)
7980
if _, err := d.c.Cluster(name).SSL().Update(ctx, ssl); err != nil {
80-
return err
81+
return fmt.Errorf("failed to update ssl for sni %+v: %w", ssl.Snis, err)
8182
}
8283
}
8384
}

0 commit comments

Comments
 (0)