vmcluster/vmsingle: support downsampling and retention filters#2224
Conversation
There was a problem hiding this comment.
4 issues found across 13 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
83b6f64 to
6f7673c
Compare
|
@cubic-ai-dev |
@AndrewChubatiuk I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 14 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
c1e6af7 to
a7168d8
Compare
| // Downsampling defines downsampling rules applied to vmselect and vmstorage components. | ||
| // Requires enterprise license. See https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/#downsampling | ||
| // +optional | ||
| Downsampling *DownsamplingConfig `json:"downsampling,omitempty"` |
There was a problem hiding this comment.
If I understood correctly this would add more params in extraArgs.downsampling - would it crash if there are duplicates? We should add some more tests on a mix of spec.downsampling + spec.extraArgs
There was a problem hiding this comment.
if downsampling section is defined it rewrites extraArgs
There was a problem hiding this comment.
right, we should add this to the docs / API documentation
3a0fefc to
e39bc2e
Compare
942798f to
59dbe0f
Compare
fixes #2221
related issue VictoriaMetrics/helm-charts#2221
Summary by cubic
Adds structured downsampling and per-series retention filters to
VMSingleandVMCluster. The operator validates the enterprise license, renders the right flags, and forVMClusteronly defaults-dedup.minScrapeIntervalto1mswhen neither the flag norspec.downsampling.dedupIntervalis set.New Features
spec.downsamplingforVMSingleandVMCluster: rules{filter?, periods:[{offset, interval}]}with optionaldedupInterval; applied tovmselectandvmstorageonVMCluster.spec.retentionFiltersforVMSingle;spec.vmstorage.retentionFiltersforVMCluster.licenserequired; parses label filters and durations; offset must be a multiple of interval; period intervals must be pairwise multiples;dedupIntervalmust divide all rule intervals; duplicate rule filters rejected; per-seriesretentionmust not exceedspec.retentionPeriod.-downsampling.periodper period (prefixed withfilterwhen set), set-dedup.minScrapeIntervalfromdedupInterval(or1msonVMClusterwhen not provided), and emit-retentionFilteronVMSingleandVMClustervmstorage. CRDs, deepcopy, tests, and docs updated; examples now use structured fields.Migration
spec.downsamplingandspec.retentionFiltersoverextraArgs; when set, they override relatedextraArgs.spec.license. Usespec.retentionPeriodas the default retention.Written for commit 59dbe0f. Summary will update on new commits.