mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
pkg/proxy/conntrack: refactor log levels for conntrack cleanup
Signed-off-by: Daman Arora <aroradaman@gmail.com>
This commit is contained in:
parent
07c279d06b
commit
6971779d0d
@ -139,7 +139,7 @@ var protocolMap = map[v1.Protocol]uint8{
|
|||||||
// filterForNAT returns *conntrackFilter to delete the conntrack entries for connections
|
// filterForNAT returns *conntrackFilter to delete the conntrack entries for connections
|
||||||
// specified by the destination IP (original direction) and source IP (reply direction).
|
// specified by the destination IP (original direction) and source IP (reply direction).
|
||||||
func filterForNAT(origin, dest string, protocol v1.Protocol) *conntrackFilter {
|
func filterForNAT(origin, dest string, protocol v1.Protocol) *conntrackFilter {
|
||||||
klog.V(4).InfoS("Adding conntrack filter for cleanup", "org-dst", origin, "reply-src", dest, "protocol", protocol)
|
klog.V(6).InfoS("Adding conntrack filter for cleanup", "org-dst", origin, "reply-src", dest, "protocol", protocol)
|
||||||
return &conntrackFilter{
|
return &conntrackFilter{
|
||||||
protocol: protocolMap[protocol],
|
protocol: protocolMap[protocol],
|
||||||
original: &connectionTuple{
|
original: &connectionTuple{
|
||||||
@ -154,7 +154,7 @@ func filterForNAT(origin, dest string, protocol v1.Protocol) *conntrackFilter {
|
|||||||
// filterForPortNAT returns *conntrackFilter to delete the conntrack entries for connections
|
// filterForPortNAT returns *conntrackFilter to delete the conntrack entries for connections
|
||||||
// specified by the destination Port (original direction) and source IP (reply direction).
|
// specified by the destination Port (original direction) and source IP (reply direction).
|
||||||
func filterForPortNAT(dest string, port int, protocol v1.Protocol) *conntrackFilter {
|
func filterForPortNAT(dest string, port int, protocol v1.Protocol) *conntrackFilter {
|
||||||
klog.V(4).InfoS("Adding conntrack filter for cleanup", "org-port-dst", port, "reply-src", dest, "protocol", protocol)
|
klog.V(6).InfoS("Adding conntrack filter for cleanup", "org-port-dst", port, "reply-src", dest, "protocol", protocol)
|
||||||
return &conntrackFilter{
|
return &conntrackFilter{
|
||||||
protocol: protocolMap[protocol],
|
protocol: protocolMap[protocol],
|
||||||
original: &connectionTuple{
|
original: &connectionTuple{
|
||||||
|
@ -96,6 +96,6 @@ func (f *conntrackFilter) MatchConntrackFlow(flow *netlink.ConntrackFlow) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// appending a new line to the flow makes klog print multiline log which is easier to debug and understand.
|
// appending a new line to the flow makes klog print multiline log which is easier to debug and understand.
|
||||||
klog.V(4).InfoS("Deleting conntrack entry", "flow", flow.String()+"\n")
|
klog.V(5).InfoS("Deleting conntrack entry", "flow", flow.String()+"\n")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user