From b9690e2eb8fb9015b3f34882a1fa4e7267638559 Mon Sep 17 00:00:00 2001 From: Jatin Suri <52750297+jatinsu@users.noreply.github.com> Date: Wed, 3 Jul 2024 01:37:25 -0400 Subject: [PATCH] feat(operator): Add support for the volume API (#13369) --- operator/CHANGELOG.md | 4 +++ operator/apis/loki/v1/lokistack_types.go | 7 +++++ .../loki-operator.clusterserviceversion.yaml | 12 ++++++++ .../loki.grafana.com_lokistacks.yaml | 10 +++++++ .../bases/loki.grafana.com_lokistacks.yaml | 10 +++++++ .../loki-operator.clusterserviceversion.yaml | 12 ++++++++ operator/docs/operator/api.md | 12 ++++++++ .../manifests/internal/config/build_test.go | 30 +++++++++++++++++++ .../internal/config/loki-config.yaml | 2 ++ .../internal/config/loki-runtime-config.yaml | 3 ++ operator/internal/manifests/internal/sizes.go | 3 ++ 11 files changed, 105 insertions(+) diff --git a/operator/CHANGELOG.md b/operator/CHANGELOG.md index 5ab99c69f60bf..bbe1c75c7315a 100644 --- a/operator/CHANGELOG.md +++ b/operator/CHANGELOG.md @@ -1,5 +1,9 @@ ## Main +## Release 5.6.21 + +- [13369](https://github.com/grafana/loki/pull/13369) **jatinsu**: feat(operator): Add support for the volume API + ## Release 5.6.20 - [13066](https://github.com/grafana/loki/pull/13066) **xperimental**: Use a minimum value for replay memory ceiling diff --git a/operator/apis/loki/v1/lokistack_types.go b/operator/apis/loki/v1/lokistack_types.go index 6531681bb805f..be7fbce8cc85b 100644 --- a/operator/apis/loki/v1/lokistack_types.go +++ b/operator/apis/loki/v1/lokistack_types.go @@ -562,6 +562,13 @@ type QueryLimitSpec struct { // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Cardinality Limit" CardinalityLimit int32 `json:"cardinalityLimit,omitempty"` + + // MaxVolumeSeries defines the maximum number of aggregated series in a log-volume response + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Max Volume Series" + MaxVolumeSeries int32 `json:"maxVolumeSeries,omitempty"` } // IngestionLimitSpec defines the limits applied at the ingestion path. diff --git a/operator/bundle/manifests/loki-operator.clusterserviceversion.yaml b/operator/bundle/manifests/loki-operator.clusterserviceversion.yaml index bad1ce8957af1..291d8c8e9ac2e 100644 --- a/operator/bundle/manifests/loki-operator.clusterserviceversion.yaml +++ b/operator/bundle/manifests/loki-operator.clusterserviceversion.yaml @@ -390,6 +390,12 @@ spec: path: limits.global.queries.maxQuerySeries x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number + - description: MaxVolumeSeries defines the maximum number of aggregated series + in a log-volume response + displayName: Max Volume Series + path: limits.global.queries.maxVolumeSeries + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number - description: Timeout when querying ingesters or storage during the execution of a query request. displayName: Query Timeout @@ -474,6 +480,12 @@ spec: path: limits.tenants.queries.maxQuerySeries x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number + - description: MaxVolumeSeries defines the maximum number of aggregated series + in a log-volume response + displayName: Max Volume Series + path: limits.tenants.queries.maxVolumeSeries + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number - description: Timeout when querying ingesters or storage during the execution of a query request. displayName: Query Timeout diff --git a/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml b/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml index e2b67f8ac1c4c..8b844392707dd 100644 --- a/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml +++ b/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml @@ -170,6 +170,11 @@ spec: unique series that is returned by a metric query. format: int32 type: integer + maxVolumeSeries: + description: MaxVolumeSeries defines the maximum number + of aggregated series in a log-volume response + format: int32 + type: integer queryTimeout: default: 3m description: Timeout when querying ingesters or storage @@ -298,6 +303,11 @@ spec: of unique series that is returned by a metric query. format: int32 type: integer + maxVolumeSeries: + description: MaxVolumeSeries defines the maximum number + of aggregated series in a log-volume response + format: int32 + type: integer queryTimeout: default: 3m description: Timeout when querying ingesters or storage diff --git a/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml b/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml index 530ba681b8f18..87fef6a8bd519 100644 --- a/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml +++ b/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml @@ -153,6 +153,11 @@ spec: unique series that is returned by a metric query. format: int32 type: integer + maxVolumeSeries: + description: MaxVolumeSeries defines the maximum number + of aggregated series in a log-volume response + format: int32 + type: integer queryTimeout: default: 3m description: Timeout when querying ingesters or storage @@ -281,6 +286,11 @@ spec: of unique series that is returned by a metric query. format: int32 type: integer + maxVolumeSeries: + description: MaxVolumeSeries defines the maximum number + of aggregated series in a log-volume response + format: int32 + type: integer queryTimeout: default: 3m description: Timeout when querying ingesters or storage diff --git a/operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml b/operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml index df85cabbd150c..9d73cf6e5f967 100644 --- a/operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml +++ b/operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml @@ -245,6 +245,12 @@ spec: path: limits.global.queries.maxQuerySeries x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number + - description: MaxVolumeSeries defines the maximum number of aggregated series + in a log-volume response + displayName: Max Volume Series + path: limits.global.queries.maxVolumeSeries + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number - description: Timeout when querying ingesters or storage during the execution of a query request. displayName: Query Timeout @@ -329,6 +335,12 @@ spec: path: limits.tenants.queries.maxQuerySeries x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number + - description: MaxVolumeSeries defines the maximum number of aggregated series + in a log-volume response + displayName: Max Volume Series + path: limits.tenants.queries.maxVolumeSeries + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number - description: Timeout when querying ingesters or storage during the execution of a query request. displayName: Query Timeout diff --git a/operator/docs/operator/api.md b/operator/docs/operator/api.md index b32ea2c7a9f3c..da3e4ed9caf18 100644 --- a/operator/docs/operator/api.md +++ b/operator/docs/operator/api.md @@ -1862,6 +1862,18 @@ int32
CardinalityLimit defines the cardinality limit for index queries.
+maxVolumeSeries
MaxVolumeSeries defines the maximum number of aggregated series in a log-volume response
+