Skip to content

Commit

Permalink
Update log (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
lou-lan authored Aug 29, 2023
1 parent e40872d commit 98220e5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkg/agent/eip.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ type eip struct {

func (r *eip) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error) {
log := r.log.WithValues("name", req.Name, "kind", "EgressGateway")
log.Info("reconcile")
log.V(1).Info("reconcile")

deleted := false
gateway := new(egressv1.EgressGateway)
Expand Down
8 changes: 4 additions & 4 deletions pkg/agent/police.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ func buildNatStaticRule(base uint32) map[string][]iptables.Rule {
}

func (r *policeReconciler) reconcileClusterInfo(ctx context.Context, req reconcile.Request, log logr.Logger) (reconcile.Result, error) {
log = log.WithValues("name", req.Name)
log = log.V(1).WithValues("name", req.Name)
log.Info("reconciling")

info := new(egressv1.EgressClusterInfo)
Expand Down Expand Up @@ -698,7 +698,7 @@ func (r *policeReconciler) ensureClusterInfoIPSet() error {
// - add/update/delete egress gateway
// - iptables/ipset
func (r *policeReconciler) reconcileGateway(ctx context.Context, req reconcile.Request, log logr.Logger) (reconcile.Result, error) {
log.Info("reconciling")
log.V(1).Info("reconciling")
err := r.initApplyPolicy()
if err != nil {
return reconcile.Result{Requeue: true}, err
Expand Down Expand Up @@ -758,7 +758,7 @@ func buildMangleStaticRule(base uint32) map[string][]iptables.Rule {
// - ipset
func (r *policeReconciler) reconcilePolicy(ctx context.Context, req reconcile.Request, log logr.Logger) (reconcile.Result, error) {
log = log.WithValues("name", req.Name, "namespace", req.Namespace)
log.Info("reconciling")
log.V(1).Info("reconciling")

policy := new(egressv1.EgressPolicy)
deleted := false
Expand Down Expand Up @@ -820,7 +820,7 @@ func (r *policeReconciler) reconcilePolicy(ctx context.Context, req reconcile.Re
// - ipset
func (r *policeReconciler) reconcileClusterPolicy(ctx context.Context, req reconcile.Request, log logr.Logger) (reconcile.Result, error) {
log = log.WithValues("name", req.Name)
log.Info("reconciling")
log.V(1).Info("reconciling")

policy := new(egressv1.EgressClusterPolicy)
deleted := false
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/cluster_endpoint_slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (r *endpointClusterReconciler) Reconcile(ctx context.Context, req reconcile
"kind", "EgressClusterEndpointSlice",
)

log.Info("reconcile")
log.V(1).Info("reconcile")
deleted := false
policy := new(v1beta1.EgressClusterPolicy)
err := r.client.Get(ctx, req.NamespacedName, policy)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/egress_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (r *egpReconciler) Reconcile(ctx context.Context, req reconcile.Request) (r
}

log := r.log.WithValues("name", newReq.Name, "kind", kind)
log.Info("reconciling")
log.V(1).Info("reconciling")
switch kind {
case "EgressGateway":
return r.reconcileEGW(ctx, newReq, log)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/egress_tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (r *egReconciler) Reconcile(ctx context.Context, req reconcile.Request) (re
})

log := r.log.WithValues("name", newReq.Name, "kind", kind)
log.Info("reconciling")
log.V(1).Info("reconciling")
switch kind {
case "EgressTunnel":
return r.reconcileEGN(ctx, newReq, log)
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/endpoint_slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (r *endpointReconciler) Reconcile(ctx context.Context, req reconcile.Reques
"name", req.Name,
"kind", "EgressPolicy")

log.Info("reconcile")
log.V(1).Info("reconcile")
deleted := false
policy := new(v1beta1.EgressPolicy)
err := r.client.Get(ctx, req.NamespacedName, policy)
Expand Down
2 changes: 1 addition & 1 deletion pkg/egressgateway/egress_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ func (r egnReconciler) reconcileEGP(ctx context.Context, req reconcile.Request,
} else {
log = log.WithValues("name", req.Name, "namespace", req.Namespace)
}
log.Info("reconciling")
log.V(1).Info("reconciling")

deleted := false
isUpdate := false
Expand Down

0 comments on commit 98220e5

Please sign in to comment.