From 9e68d91c015fce75de946d0108aa21ebe23611c9 Mon Sep 17 00:00:00 2001 From: Leandro Beretta Date: Tue, 18 Nov 2025 10:59:43 -0300 Subject: [PATCH 1/6] added tracked kinds to flp --- go.mod | 2 ++ go.sum | 4 ++-- internal/controller/flp/flp_pipeline_builder.go | 1 + vendor/modules.txt | 3 ++- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b37b00520..2a1166246 100644 --- a/go.mod +++ b/go.mod @@ -118,3 +118,5 @@ require ( sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect ) + +replace github.com/netobserv/flowlogs-pipeline => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850 diff --git a/go.sum b/go.sum index 2ab23ac6d..1ea15bb48 100644 --- a/go.sum +++ b/go.sum @@ -101,6 +101,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850 h1:n1F0Q/mzTo/pBSa/jpDXKgHVHqAI3niOQqqsTG34DZ0= +github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850/go.mod h1:YiyDjjK5qfiw5XwXMI1Kxl1NT8tbr7kZcXV2QxLBPCs= github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= @@ -117,8 +119,6 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/netobserv/flowlogs-pipeline v1.10.0-community h1:3Km5B+UmDrYPeiwhWY43YYEIlzjbRfErKMQ67PtMZWQ= -github.com/netobserv/flowlogs-pipeline v1.10.0-community/go.mod h1:CuhvsFU2p15A9RPWSOGZaaCfjsocn7ZYtxKH2hAehZY= github.com/netobserv/netobserv-ebpf-agent v1.10.0-community h1:XLauF3k+G2RV2EgHvYK+r3zq0FRm+k7P3hq0I0J6GzE= github.com/netobserv/netobserv-ebpf-agent v1.10.0-community/go.mod h1:n75b6DyE/soLE794JlxILqt8rd/KoPfSoUs1WN4jzqg= github.com/netsampler/goflow2 v1.3.7 h1:XZaTy8kkMnGXpJ9hS3KbO1McyrFTpVNhVFEx9rNhMmc= diff --git a/internal/controller/flp/flp_pipeline_builder.go b/internal/controller/flp/flp_pipeline_builder.go index 064af47ac..e2cda6466 100644 --- a/internal/controller/flp/flp_pipeline_builder.go +++ b/internal/controller/flp/flp_pipeline_builder.go @@ -194,6 +194,7 @@ func (b *PipelineBuilder) AddProcessorStages() error { SubnetLabels: flpLabels, KubeConfig: api.NetworkTransformKubeConfig{ SecondaryNetworks: secondaryNetworks, + TrackedKinds: []string{"ReplicaSet", "Deployment", "Gateway"}, }, }) diff --git a/vendor/modules.txt b/vendor/modules.txt index f5af5efa3..4abc27798 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -161,7 +161,7 @@ github.com/munnerz/goautoneg # github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f ## explicit github.com/mwitkow/go-conntrack -# github.com/netobserv/flowlogs-pipeline v1.10.0-community +# github.com/netobserv/flowlogs-pipeline v1.10.0-community => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850 ## explicit; go 1.24.0 github.com/netobserv/flowlogs-pipeline/pkg/api github.com/netobserv/flowlogs-pipeline/pkg/config @@ -1253,3 +1253,4 @@ sigs.k8s.io/structured-merge-diff/v6/value # sigs.k8s.io/yaml v1.6.0 ## explicit; go 1.22 sigs.k8s.io/yaml +# github.com/netobserv/flowlogs-pipeline => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850 From 18ff08c4cb4e44910161f87006a139886734a0eb Mon Sep 17 00:00:00 2001 From: Leandro Beretta Date: Tue, 18 Nov 2025 11:35:57 -0300 Subject: [PATCH 2/6] fix deps --- go.mod | 2 +- go.sum | 4 ++-- vendor/modules.txt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 2a1166246..938748ac2 100644 --- a/go.mod +++ b/go.mod @@ -119,4 +119,4 @@ require ( sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect ) -replace github.com/netobserv/flowlogs-pipeline => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850 +replace github.com/netobserv/flowlogs-pipeline => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251118132147-7cea2b332a10 diff --git a/go.sum b/go.sum index 1ea15bb48..007de32e7 100644 --- a/go.sum +++ b/go.sum @@ -101,8 +101,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850 h1:n1F0Q/mzTo/pBSa/jpDXKgHVHqAI3niOQqqsTG34DZ0= -github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850/go.mod h1:YiyDjjK5qfiw5XwXMI1Kxl1NT8tbr7kZcXV2QxLBPCs= +github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251118132147-7cea2b332a10 h1:ycofhBMbtu7Eun4VBoLNoLjcB129KsmtLvR3rCMQUS8= +github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251118132147-7cea2b332a10/go.mod h1:YiyDjjK5qfiw5XwXMI1Kxl1NT8tbr7kZcXV2QxLBPCs= github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/maruel/natural v1.1.1 h1:Hja7XhhmvEFhcByqDoHz9QZbkWey+COd9xWfCfn1ioo= diff --git a/vendor/modules.txt b/vendor/modules.txt index 4abc27798..fa1144164 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -161,7 +161,7 @@ github.com/munnerz/goautoneg # github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f ## explicit github.com/mwitkow/go-conntrack -# github.com/netobserv/flowlogs-pipeline v1.10.0-community => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850 +# github.com/netobserv/flowlogs-pipeline v1.10.0-community => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251118132147-7cea2b332a10 ## explicit; go 1.24.0 github.com/netobserv/flowlogs-pipeline/pkg/api github.com/netobserv/flowlogs-pipeline/pkg/config @@ -1253,4 +1253,4 @@ sigs.k8s.io/structured-merge-diff/v6/value # sigs.k8s.io/yaml v1.6.0 ## explicit; go 1.22 sigs.k8s.io/yaml -# github.com/netobserv/flowlogs-pipeline => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251117140139-4c3b8acec850 +# github.com/netobserv/flowlogs-pipeline => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251118132147-7cea2b332a10 From 078a77bfea5e768f3ef48e37edcec9d218310836 Mon Sep 17 00:00:00 2001 From: Leandro Beretta Date: Tue, 18 Nov 2025 11:36:18 -0300 Subject: [PATCH 3/6] fix deps --- .../netobserv/flowlogs-pipeline/pkg/api/transform_network.go | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/transform_network.go b/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/transform_network.go index 68a2e99c0..848784fdf 100644 --- a/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/transform_network.go +++ b/vendor/github.com/netobserv/flowlogs-pipeline/pkg/api/transform_network.go @@ -52,6 +52,7 @@ type NetworkTransformKubeConfig struct { ConfigPath string `yaml:"configPath,omitempty" json:"configPath,omitempty" doc:"path to kubeconfig file (optional)"` SecondaryNetworks []SecondaryNetwork `yaml:"secondaryNetworks,omitempty" json:"secondaryNetworks,omitempty" doc:"configuration for secondary networks"` ManagedCNI []string `yaml:"managedCNI,omitempty" json:"managedCNI,omitempty" doc:"a list of CNI (network plugins) to manage, for detecting additional interfaces. Currently supported: ovn"` + TrackedKinds []string `yaml:"trackedKinds,omitempty" json:"trackedKinds,omitempty" doc:"list of Kubernetes resource kinds to track for ownership chain (e.g., Deployment, Gateway, VirtualMachine). If a resource's owner is in this list, FLP will continue tracking up the ownership chain."` } type TransformNetworkOperationEnum string From a01d12482c4a07c48255be98ec292dbf14af5e98 Mon Sep 17 00:00:00 2001 From: Leandro Beretta Date: Wed, 19 Nov 2025 11:19:25 -0300 Subject: [PATCH 4/6] fix permissions --- ...bserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml | 1 + config/rbac/component_roles.yaml | 1 + ...bserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/bundle/manifests/netobserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml b/bundle/manifests/netobserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml index bdcc42bf6..c763f5231 100644 --- a/bundle/manifests/netobserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ b/bundle/manifests/netobserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -18,6 +18,7 @@ rules: - apps resources: - replicasets + - deployments verbs: - get - list diff --git a/config/rbac/component_roles.yaml b/config/rbac/component_roles.yaml index 9b4204090..d3db8a584 100644 --- a/config/rbac/component_roles.yaml +++ b/config/rbac/component_roles.yaml @@ -74,6 +74,7 @@ rules: - apps resources: - replicasets + - deployments verbs: - get - list diff --git a/helm/templates/netobserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml b/helm/templates/netobserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml index bdcc42bf6..c763f5231 100644 --- a/helm/templates/netobserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml +++ b/helm/templates/netobserv-informers_rbac.authorization.k8s.io_v1_clusterrole.yaml @@ -18,6 +18,7 @@ rules: - apps resources: - replicasets + - deployments verbs: - get - list From b53f4f2e0a3baeb556520362886edaccdfea1009 Mon Sep 17 00:00:00 2001 From: Leandro Beretta Date: Wed, 10 Dec 2025 12:44:50 -0300 Subject: [PATCH 5/6] fix flp dep --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 938748ac2..448d53968 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/go-logr/logr v1.4.3 github.com/google/go-cmp v0.7.0 github.com/grafana/loki/operator/apis/loki v0.0.0-20241021105923-5e970e50b166 - github.com/netobserv/flowlogs-pipeline v1.10.0-community + github.com/netobserv/flowlogs-pipeline v1.10.0-community.0.20251210152116-25aa7fa1fa23 github.com/netobserv/netobserv-ebpf-agent v1.10.0-community github.com/onsi/ginkgo/v2 v2.27.2 github.com/onsi/gomega v1.38.2 From 741093677c898e8df9eded91724457e0bf15e28b Mon Sep 17 00:00:00 2001 From: Leandro Beretta Date: Wed, 10 Dec 2025 12:50:18 -0300 Subject: [PATCH 6/6] fix vendoring --- vendor/modules.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/modules.txt b/vendor/modules.txt index fa1144164..78c1aa514 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -161,7 +161,7 @@ github.com/munnerz/goautoneg # github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f ## explicit github.com/mwitkow/go-conntrack -# github.com/netobserv/flowlogs-pipeline v1.10.0-community => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251118132147-7cea2b332a10 +# github.com/netobserv/flowlogs-pipeline v1.10.0-community.0.20251210152116-25aa7fa1fa23 => github.com/leandroberetta/flowlogs-pipeline v0.0.0-20251118132147-7cea2b332a10 ## explicit; go 1.24.0 github.com/netobserv/flowlogs-pipeline/pkg/api github.com/netobserv/flowlogs-pipeline/pkg/config