Skip to content

Commit 1162eee

Browse files
authoredFeb 26, 2025
disable some expensive logs (#157)
<!-- Thanks for sending a pull request! Here are some tips for you: 1. Ensure you have added the unit tests for your changes. 2. Ensure you have included output of manual testing done in the Testing section. 3. Ensure number of lines of code for new or existing methods are within the reasonable limit. 4. Ensure your change works on existing clusters after upgrade. --> **What type of PR is this?** <!-- Add one of the following: bug cleanup documentation feature --> cleanup **Which issue does this PR fix**: **What does this PR do / Why do we need it**: We need disable some expensive logs if they are not very helpful. **If an issue # is not available please add steps to reproduce and the controller logs**: **Testing done on this change**: <!-- output of manual testing/integration tests results and also attach logs showing the fix being resolved --> **Automation added to e2e**: <!-- List the e2e tests you added as part of this PR. If no, create an issue with enhancement/testing label --> **Will this PR introduce any new dependencies?**: <!-- e.g. new K8s API --> **Will this break upgrades or downgrades. Has updating a running cluster been tested?**: **Does this PR introduce any user-facing change?**: <!-- If yes, a release note update is required: Enter your extended release note in the block below. If the PR requires additional actions from users switching to the new release, include the string "action required". --> ```release-note ``` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
2 parents 5f9a85b + 68e7e8c commit 1162eee

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed
 

‎pkg/policyendpoints/manager.go

-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ func (m *policyEndpointsManager) processPolicyEndpoints(pes []policyinfo.PolicyE
177177
pe.Spec.Egress = combineRulesEndpoints(pe.Spec.Egress)
178178
newPEs = append(newPEs, pe)
179179
}
180-
m.logger.Info("manager processed policy endpoints to consolidate rules", "preLen", len(pes), "postLen", len(newPEs), "newPEs", newPEs)
181180
return newPEs
182181
}
183182

‎pkg/resolvers/endpoints.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ func (r *defaultEndpointsResolver) getMatchingPodAddresses(ctx context.Context,
351351
for _, pod := range podList.Items {
352352
podIP := k8s.GetPodIP(&pod)
353353
if len(podIP) == 0 {
354-
r.logger.Info("pod IP not assigned yet", "pod", k8s.NamespacedName(&pod))
355354
continue
356355
}
357356

@@ -476,7 +475,7 @@ func (r *defaultEndpointsResolver) getMatchingServicePort(ctx context.Context, s
476475
if portVal, err := k8s.LookupListenPortFromPodSpec(svc, &podList.Items[i], *port, protocol); err == nil {
477476
return portVal, nil
478477
} else {
479-
r.logger.Info("The pod doesn't have port matched", "err", err, "pod", podList.Items[i])
478+
r.logger.V(1).Info("The pod doesn't have port matched", "err", err, "pod", podList.Items[i])
480479
}
481480
}
482481
return 0, errors.Errorf("unable to find matching service listen port %s for service %s", port.String(), k8s.NamespacedName(svc))

0 commit comments

Comments
 (0)
Failed to load comments.