Skip to content

Commit

Permalink
K8s net attributes: default src/dst owner type (#1114)
Browse files Browse the repository at this point in the history
* K8s net attributes: default src/dst owner type

* fix unit tests
  • Loading branch information
mariomac authored Aug 29, 2024
1 parent dd145d6 commit e98ffbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/export/attributes/attr_defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ func getDefinitions(groups AttrGroups) map[Section]AttrReportGroup {
Disabled: !kubeEnabled,
Attributes: map[attr.Name]Default{
attr.K8sSrcOwnerName: true,
attr.K8sSrcOwnerType: true,
attr.K8sSrcNamespace: true,
attr.K8sDstOwnerName: true,
attr.K8sDstOwnerType: true,
attr.K8sDstNamespace: true,
attr.K8sClusterName: true,
attr.K8sSrcName: false,
attr.K8sSrcType: false,
attr.K8sSrcOwnerType: false,
attr.K8sSrcNodeIP: false,
attr.K8sSrcNodeName: false,
attr.K8sDstName: false,
attr.K8sDstType: false,
attr.K8sDstOwnerType: false,
attr.K8sDstNodeIP: false,
attr.K8sDstNodeName: false,
},
Expand Down
3 changes: 3 additions & 0 deletions pkg/export/attributes/attr_selector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func TestFor_GlobEntries_NoInclusion(t *testing.T) {
"direction",
"k8s.cluster.name",
"k8s.src.owner.name",
"k8s.src.owner.type",
"src.cidr",
}, p.For(BeylaNetworkFlow))
}
Expand Down Expand Up @@ -166,8 +167,10 @@ func TestDefault(t *testing.T) {
"k8s.cluster.name",
"k8s.dst.namespace",
"k8s.dst.owner.name",
"k8s.dst.owner.type",
"k8s.src.namespace",
"k8s.src.owner.name",
"k8s.src.owner.type",
}, p.For(BeylaNetworkFlow))
}

Expand Down

0 comments on commit e98ffbf

Please sign in to comment.