-
Notifications
You must be signed in to change notification settings - Fork 24
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
Layer enrichment: remove hard-coded pieces, add tests #579
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #579 +/- ##
==========================================
+ Coverage 65.80% 66.45% +0.65%
==========================================
Files 102 103 +1
Lines 7445 7506 +61
==========================================
+ Hits 4899 4988 +89
+ Misses 2256 2225 -31
- Partials 290 293 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
InfraPrefixes []string `yaml:"infra_prefixes,omitempty" json:"infra_prefixes,omitempty" doc:"Namespace prefixes that will be tagged as infra"` | ||
InfraRefs []K8sReference `yaml:"infra_refs,omitempty" json:"infra_refs,omitempty" doc:"Additional object references to be tagged as infra"` | ||
} | ||
|
||
type K8sReference struct { | ||
Name string `yaml:"name,omitempty" json:"name,omitempty" doc:"name of the object"` | ||
Namespace string `yaml:"namespace,omitempty" json:"namespace,omitempty" doc:"namespace of the object"` |
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.
I feel a bit confusing having these two arrays separated.
Why not having a single filters
array similar to what we have in prometheus ?
flowlogs-pipeline/pkg/api/encode_prom.go
Lines 70 to 74 in 31e4180
type MetricsFilter struct { | |
Key string `yaml:"key" json:"key" doc:"the key to match and filter by"` | |
Value string `yaml:"value" json:"value" doc:"the value to match and filter by"` | |
Type string `yaml:"type" json:"type" enum:"MetricEncodeFilterTypeEnum" doc:"the type of filter match: exact (default), presence, absence or regex"` | |
} |
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.
hmm that would force us to have in a common struct some values (fields) that are quite different, a single prefix in a case, or a name+namespace couple in the other .. we could of course force a generic structure for having both, but I'm not sure this is cleaner than the current solution (?)
/hold |
superseded by #580 |
No user-facing change.
(this PR requires to update the operator for configuring FLP)