Skip to content

Commit 8dd3f9b

Browse files
committed
fix linting
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
1 parent c8b18d1 commit 8dd3f9b

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

checks/net_pod_correlation.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ const (
6969
)
7070

7171
var (
72-
// Keep this updated with all the possible keys
72+
// Keep these updated with all the possible keys
73+
74+
// AllAttributeKeys expose all the possible attribute keys
7375
AllAttributeKeys = []string{
7476
DirectionKey,
7577
LocalIPKey,
@@ -84,6 +86,7 @@ var (
8486
RemoteLabelsKey,
8587
}
8688

89+
// DefaultAttributeKeys are the default attribute keys used if the user doesn't specify any
8790
DefaultAttributeKeys = []string{
8891
DirectionKey,
8992
LocalPodNameKey,
@@ -329,7 +332,7 @@ func conntrackOriginTCP(connTuple *network.ConnectionTuple) netlink.ConTuple {
329332
}
330333
}
331334

332-
func (pi *podCorrelationInfo) tryClusterIpResolution(conn *network.ConnectionStats) *kube.PodInfo {
335+
func (pi *podCorrelationInfo) tryClusterIPResolution(conn *network.ConnectionStats) *kube.PodInfo {
333336
// if we arrive here dstPodInfo is nil and the connection is OUTGOING
334337
var dstPodInfo *kube.PodInfo
335338
// First we try the resolution using the translation info attached to the connection
@@ -412,7 +415,7 @@ func (pi *podCorrelationInfo) exportOTELMetrics(conn *network.ConnectionStats, m
412415

413416
// if we have the destination pod there is no need to try to resolve it
414417
if conn.Direction == network.OUTGOING && dstPodInfo == nil {
415-
dstPodInfo = pi.tryClusterIpResolution(conn)
418+
dstPodInfo = pi.tryClusterIPResolution(conn)
416419
}
417420

418421
// if one of the 2 is nil we need to check if we want to export partial correlation

pkg/kube/observer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ func WithPodDebugEndpoint() ObserverOption {
117117
}
118118
}
119119

120+
// WithShortLivedConnectionsInterval sets the interval for filtering short lived connections.
120121
func WithShortLivedConnectionsInterval(interval time.Duration) ObserverOption {
121122
return func(o *Observer) {
122123
o.shortLivedConnInterval = interval

0 commit comments

Comments
 (0)