Skip to content

Commit 5a82e0e

Browse files
vmsingle and vmagent: keep_input for streaming aggregation
1 parent 64879fb commit 5a82e0e

File tree

5 files changed

+23
-0
lines changed

5 files changed

+23
-0
lines changed

api/operator/v1beta1/vmextra_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,9 @@ type StreamAggrRule struct {
563563
// +optional
564564
IgnoreOldSamples *bool `json:"ignore_old_samples,omitempty" yaml:"ignore_old_samples,omitempty"`
565565

566+
// KeepInput instructs whether to keep all the matched input samples after the aggregation
567+
KeepInput *bool `json:"keep_input,omitempty" yaml:"keep_input,omitempty"`
568+
566569
// By is an optional list of labels for grouping input series.
567570
//
568571
// See also Without.

api/operator/v1beta1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/overlay/crd.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3291,6 +3291,10 @@ spec:
32913291
interval:
32923292
description: Interval is the interval between aggregations.
32933293
type: string
3294+
keep_input:
3295+
description: KeepInput instructs whether to keep all
3296+
the matched input samples after the aggregation
3297+
type: boolean
32943298
keep_metric_names:
32953299
description: KeepMetricNames instructs to leave metric
32963300
names as is for the output time series without adding
@@ -5090,6 +5094,10 @@ spec:
50905094
interval:
50915095
description: Interval is the interval between aggregations.
50925096
type: string
5097+
keep_input:
5098+
description: KeepInput instructs whether to keep all the
5099+
matched input samples after the aggregation
5100+
type: boolean
50935101
keep_metric_names:
50945102
description: KeepMetricNames instructs to leave metric names
50955103
as is for the output time series without adding any suffix.
@@ -28534,6 +28542,10 @@ spec:
2853428542
interval:
2853528543
description: Interval is the interval between aggregations.
2853628544
type: string
28545+
keep_input:
28546+
description: KeepInput instructs whether to keep all the
28547+
matched input samples after the aggregation
28548+
type: boolean
2853728549
keep_metric_names:
2853828550
description: KeepMetricNames instructs to leave metric names
2853928551
as is for the output time series without adding any suffix.

docs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ aliases:
7575

7676
- [vmscrapeconfig](https://docs.victoriametrics.com/operator/api#vmscrapeconfig) - added `max_scrape_size` parameter for scrape protocols configuration
7777

78+
- [vmagent](./api.md#vmagent) and [vmsingle](./api.md#vmsingle): adds new fields into `streamAggrConfig`: `keep_input`.
79+
7880
<a name="v0.45.0"></a>
7981

8082
## [v0.45.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.45.0) - 10 Jun 2024

docs/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,6 +1857,7 @@ _Appears in:_
18571857
| `ignore_old_samples` | IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval. | _boolean_ | false |
18581858
| `input_relabel_configs` | InputRelabelConfigs is an optional relabeling rules, which are applied on the input<br />before aggregation. | _[RelabelConfig](#relabelconfig) array_ | false |
18591859
| `interval` | Interval is the interval between aggregations. | _string_ | true |
1860+
| `keep_input` | KeepInput instructs whether to keep all the matched input samples after the aggregation | _boolean_ | true |
18601861
| `keep_metric_names` | KeepMetricNames instructs to leave metric names as is for the output time series without adding any suffix. | _boolean_ | false |
18611862
| `match` | Match is a label selector (or list of label selectors) for filtering time series for the given selector.<br /><br />If the match isn't set, then all the input time series are processed. | _[StringOrArray](#stringorarray)_ | false |
18621863
| `no_align_flush_to_interval` | NoAlignFlushToInterval disables aligning of flushes to multiples of Interval.<br />By default flushes are aligned to Interval. | _boolean_ | false |

0 commit comments

Comments
 (0)