Skip to content

Commit 5602649

Browse files
committed
fix gateway print log panic
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
1 parent 3c7f689 commit 5602649

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/trafficrouting/network/gateway/gateway.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ package gateway
1515

1616
import (
1717
"context"
18+
"github.com/openkruise/rollouts/pkg/util"
1819
"reflect"
1920

2021
rolloutv1alpha1 "github.com/openkruise/rollouts/api/v1alpha1"
@@ -83,7 +84,7 @@ func (r *gatewayController) EnsureRoutes(ctx context.Context, strategy *rolloutv
8384
klog.Errorf("update %s httpRoute(%s) failed: %s", r.conf.Key, httpRoute.Name, err.Error())
8485
return false, err
8586
}
86-
klog.Infof("%s set HTTPRoute(name:%s weight:%d) success", r.conf.Key, *r.conf.TrafficConf.HTTPRouteName, *weight)
87+
klog.Infof("%s set HTTPRoute(%s) desiredRule(%s) success", r.conf.Key, *r.conf.TrafficConf.HTTPRouteName, util.DumpJSON(desiredRule))
8788
return false, nil
8889
}
8990

0 commit comments

Comments
 (0)