diff --git a/api/operator/v1beta1/vmextra_types.go b/api/operator/v1beta1/vmextra_types.go
index 37ce046a6..052332828 100644
--- a/api/operator/v1beta1/vmextra_types.go
+++ b/api/operator/v1beta1/vmextra_types.go
@@ -593,6 +593,9 @@ type StreamAggrRule struct {
// +optional
IgnoreOldSamples *bool `json:"ignore_old_samples,omitempty" yaml:"ignore_old_samples,omitempty"`
+ // KeepInput instructs whether to keep all the matched input samples after the aggregation
+ KeepInput *bool `json:"keep_input,omitempty" yaml:"keep_input,omitempty"`
+
// By is an optional list of labels for grouping input series.
//
// See also Without.
diff --git a/api/operator/v1beta1/zz_generated.deepcopy.go b/api/operator/v1beta1/zz_generated.deepcopy.go
index a31a3206a..c49df1cfb 100644
--- a/api/operator/v1beta1/zz_generated.deepcopy.go
+++ b/api/operator/v1beta1/zz_generated.deepcopy.go
@@ -3139,6 +3139,11 @@ func (in *StreamAggrRule) DeepCopyInto(out *StreamAggrRule) {
*out = new(bool)
**out = **in
}
+ if in.KeepInput != nil {
+ in, out := &in.KeepInput, &out.KeepInput
+ *out = new(bool)
+ **out = **in
+ }
if in.By != nil {
in, out := &in.By, &out.By
*out = make([]string, len(*in))
diff --git a/config/crd/overlay/crd.yaml b/config/crd/overlay/crd.yaml
index 6bcf30cfc..219231d0f 100644
--- a/config/crd/overlay/crd.yaml
+++ b/config/crd/overlay/crd.yaml
@@ -6932,6 +6932,10 @@ spec:
interval:
description: Interval is the interval between aggregations.
type: string
+ keep_input:
+ description: KeepInput instructs whether to keep all
+ the matched input samples after the aggregation
+ type: boolean
keep_metric_names:
description: KeepMetricNames instructs to leave metric
names as is for the output time series without adding
@@ -8720,6 +8724,10 @@ spec:
interval:
description: Interval is the interval between aggregations.
type: string
+ keep_input:
+ description: KeepInput instructs whether to keep all the
+ matched input samples after the aggregation
+ type: boolean
keep_metric_names:
description: KeepMetricNames instructs to leave metric names
as is for the output time series without adding any suffix.
@@ -34826,6 +34834,10 @@ spec:
interval:
description: Interval is the interval between aggregations.
type: string
+ keep_input:
+ description: KeepInput instructs whether to keep all the
+ matched input samples after the aggregation
+ type: boolean
keep_metric_names:
description: KeepMetricNames instructs to leave metric names
as is for the output time series without adding any suffix.
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 04448fe5d..d3536a36a 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -35,7 +35,7 @@ To perform migration to the `VLSingle` please follow [this docs](https://docs.vi
* FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): added AWS section to VMAgent remoteWrite spec. See [#928](https://github.com/VictoriaMetrics/operator/issues/928).
* FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): introduce global scrape config for VMAgent. See [#1179](https://github.com/VictoriaMetrics/operator/issues/1179).
* FEATURE: [vmcluster](https://docs.victoriametrics.com/operator/resources/vmcluster/): added the `maxUnavailable` field to VMStorage and VMSelect specs to allow customization of rolling update behavior. See [#1457](https://github.com/VictoriaMetrics/operator/issues/1457) and minimum downtime update strategy [doc](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/#minimum-downtime-strategy). Thanks to the @vpedosyuk for the [1458](https://github.com/VictoriaMetrics/operator/pull/1458) Pull Request
-
+* FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/) and [vmsingle](https://docs.victoriametrics.com/operator/resources/vmsingle/): adds `keep_input` into `streamAggrConfig`.
* FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): Modify default `remoteWrite.maxDiskUsagePerURL` when statefulStorage.volumeClaimTemplate is set. See [#1209](https://github.com/VictoriaMetrics/operator/issues/1209)
## [v0.60.2](https://github.com/VictoriaMetrics/operator/releases/tag/v0.60.2)
diff --git a/docs/api.md b/docs/api.md
index aed3e5c64..b920da82d 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -2436,6 +2436,7 @@ Appears in: [StreamAggrConfig](#streamaggrconfig)
| ignore_old_samples#
_boolean_ | _(Optional)_
IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval. |
| input_relabel_configs#
_[RelabelConfig](#relabelconfig) array_ | _(Optional)_
InputRelabelConfigs is an optional relabeling rules, which are applied on the input
before aggregation. |
| interval#
_string_ | _(Required)_
Interval is the interval between aggregations. |
+| keep_input#
_boolean_ | _(Required)_
KeepInput instructs whether to keep all the matched input samples after the aggregation |
| keep_metric_names#
_boolean_ | _(Optional)_
KeepMetricNames instructs to leave metric names as is for the output time series without adding any suffix. |
| match#
_[StringOrArray](#stringorarray)_ | _(Optional)_
Match is a label selector (or list of label selectors) for filtering time series for the given selector.
If the match isn't set, then all the input time series are processed. |
| no_align_flush_to_interval#
_boolean_ | _(Optional)_
NoAlignFlushToInterval disables aligning of flushes to multiples of Interval.
By default flushes are aligned to Interval. |