Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions controllers/flp/flp_pipeline_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ import (
"github.com/netobserv/network-observability-operator/pkg/volumes"
)

const (
ovnkSecondary = "ovn-kubernetes"
)

type PipelineBuilder struct {
*config.PipelineBuilderStage
desired *flowslatest.FlowCollectorSpec
Expand Down Expand Up @@ -157,18 +161,31 @@ func (b *PipelineBuilder) AddProcessorStages() error {

// Propagate 2dary networks config
var secondaryNetworks []api.SecondaryNetwork
hasOvnk := false
if b.desired.Processor.Advanced != nil && len(b.desired.Processor.Advanced.SecondaryNetworks) > 0 {
for _, sn := range b.desired.Processor.Advanced.SecondaryNetworks {
flpSN := api.SecondaryNetwork{
Name: sn.Name,
Index: map[string]any{},
}
if sn.Name == ovnkSecondary {
hasOvnk = true
}
for _, index := range sn.Index {
flpSN.Index[strings.ToLower(string(index))] = nil
}
secondaryNetworks = append(secondaryNetworks, flpSN)
}
}
if !hasOvnk && helper.IsUDNMappingEnabled(&b.desired.Agent.EBPF) {
secondaryNetworks = append(secondaryNetworks, api.SecondaryNetwork{
Name: ovnkSecondary,
Index: map[string]any{
"ip": nil,
"interface": nil,
},
})
}

// enrich stage (transform) configuration
nextStage := lastStage.TransformNetwork("enrich", api.TransformNetwork{
Expand Down
Loading