-
Notifications
You must be signed in to change notification settings - Fork 46
NETOBSERV-2053: change FLP filtering API #1260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -639,9 +639,12 @@ type FlowCollectorFLP struct { | |
| // `deduper` allows to sample or drop flows identified as duplicates, in order to save on resource usage. | ||
| Deduper *FLPDeduper `json:"deduper,omitempty"` | ||
|
|
||
| // `filters` let you define custom filters to limit the amount of generated flows. | ||
| // +optional | ||
| Filters []FLPFilterSet `json:"filters"` | ||
| // `filters` lets you define custom filters to limit the amount of generated flows. | ||
| // These filters provide more flexibility than the eBPF Agent filters (in `spec.agent.ebpf.flowFilter`), such as allowing to filter by Kubernetes namespace, | ||
| // but with a lesser improvement in performance. | ||
| // [Unsupported (*)]. | ||
| Filters FLPFilters `json:"filters"` | ||
|
|
||
| // `debug` allows setting some aspects of the internal configuration of the flow processor. | ||
| // This section is aimed exclusively for debugging and fine-grained performance optimizations, | ||
|
|
@@ -690,16 +693,23 @@ const ( | |
| FLPFilterTargetExporters FLPFilterTarget = "Exporters" | ||
| ) | ||
|
|
||
| // `FLPFilterSet` defines the desired configuration for FLP-based filtering satisfying all conditions | ||
| type FLPFilterSet struct { | ||
| // `filters` is a list of matches that must be all satisfied in order to remove a flow. | ||
| // `FLPFilters` defines the desired configuration for FLP-based filtering. Flows that match those filters are kept, all other flows are discarded. | ||
| type FLPFilters struct { | ||
| // `anyOf` contains a list of rules evaluated individually: any satisfied rule results in a match. | ||
| // +optional | ||
| AllOf []FLPSingleFilter `json:"allOf"` | ||
| AnyOf []FLPFilterAnyOf `json:"anyOf"` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn´t this a breaking change ? Assuming someone already has some Filters configured, will an upgrade succeed ? |
||
|
|
||
| // If specified, this filters only target a single output: `Loki`, `Metrics` or `Exporters`. By default, all outputs are targeted. | ||
| // If specified, these filters only target a single output: `Loki`, `Metrics` or `Exporters`. By default, all outputs are targeted. | ||
| // +optional | ||
| // +kubebuilder:validation:Enum:="";"Loki";"Metrics";"Exporters" | ||
| OutputTarget FLPFilterTarget `json:"outputTarget,omitempty"` | ||
| } | ||
|
|
||
| // `FLPFilterAnyOf` defines the desired configuration for FLP-based filtering satisfying all conditions. | ||
| type FLPFilterAnyOf struct { | ||
| // `allOf` contains a list of rules that must all be satisfied in order to match a flow. | ||
| // +optional | ||
| AllOf []FLPSingleFilter `json:"allOf"` | ||
|
|
||
| // `sampling` is an optional sampling rate to apply to this filter. | ||
| //+kubebuilder:validation:Minimum=0 | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove the Unsupported references since its going GA in 1.9