diff --git a/operator/CHANGELOG.md b/operator/CHANGELOG.md index e6098594fb71..9bde176af18c 100644 --- a/operator/CHANGELOG.md +++ b/operator/CHANGELOG.md @@ -3,6 +3,7 @@ ## Release 5.6.8 - [9830](https://github.com/grafana/loki/pull/9830) **periklis**: Expose limits config setting cardinality_limit +- [9630](https://github.com/grafana/loki/pull/9630) **jpinsonneau**: Expose per_stream_rate_limit & burst ## Release 5.6.7 diff --git a/operator/apis/loki/v1/lokistack_types.go b/operator/apis/loki/v1/lokistack_types.go index 9067063f5204..3e77b0ff8ef8 100644 --- a/operator/apis/loki/v1/lokistack_types.go +++ b/operator/apis/loki/v1/lokistack_types.go @@ -610,6 +610,20 @@ type IngestionLimitSpec struct { // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Max Line Size" MaxLineSize int32 `json:"maxLineSize,omitempty"` + + // PerStreamRateLimit defines the maximum byte rate per second per stream. Units MB. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Maximum byte rate per second per stream (in MB)" + PerStreamRateLimit int32 `json:"perStreamRateLimit,omitempty"` + + // PerStreamRateLimitBurst defines the maximum burst bytes per stream. Units MB. + // + // +optional + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors="urn:alm:descriptor:com.tectonic.ui:number",displayName="Maximum burst bytes per stream (in MB)" + PerStreamRateLimitBurst int32 `json:"perStreamRateLimitBurst,omitempty"` } // RetentionStreamSpec defines a log stream with separate retention time. diff --git a/operator/bundle/manifests/loki-operator.clusterserviceversion.yaml b/operator/bundle/manifests/loki-operator.clusterserviceversion.yaml index e803ecc227a6..1ffba181e086 100644 --- a/operator/bundle/manifests/loki-operator.clusterserviceversion.yaml +++ b/operator/bundle/manifests/loki-operator.clusterserviceversion.yaml @@ -341,6 +341,18 @@ spec: path: limits.global.ingestion.maxLineSize x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number + - description: PerStreamRateLimit defines the maximum byte rate per second per + stream. Units MB. + displayName: Maximum byte rate per second per stream (in MB) + path: limits.global.ingestion.perStreamRateLimit + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: PerStreamRateLimitBurst defines the maximum burst bytes per stream. + Units MB. + displayName: Maximum burst bytes per stream (in MB) + path: limits.global.ingestion.perStreamRateLimitBurst + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number - description: CardinalityLimit defines the cardinality limit for index queries. displayName: Cardinality Limit path: limits.global.queries.cardinalityLimit @@ -413,6 +425,18 @@ spec: path: limits.tenants.ingestion.maxLineSize x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number + - description: PerStreamRateLimit defines the maximum byte rate per second per + stream. Units MB. + displayName: Maximum byte rate per second per stream (in MB) + path: limits.tenants.ingestion.perStreamRateLimit + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: PerStreamRateLimitBurst defines the maximum burst bytes per stream. + Units MB. + displayName: Maximum burst bytes per stream (in MB) + path: limits.tenants.ingestion.perStreamRateLimitBurst + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number - description: CardinalityLimit defines the cardinality limit for index queries. displayName: Cardinality Limit path: limits.tenants.queries.cardinalityLimit diff --git a/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml b/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml index 5111580a87f4..bee635f8aa24 100644 --- a/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml +++ b/operator/bundle/manifests/loki.grafana.com_lokistacks.yaml @@ -130,6 +130,16 @@ spec: on ingestion path. Units in Bytes. format: int32 type: integer + perStreamRateLimit: + description: PerStreamRateLimit defines the maximum byte + rate per second per stream. Units MB. + format: int32 + type: integer + perStreamRateLimitBurst: + description: PerStreamRateLimitBurst defines the maximum + burst bytes per stream. Units MB. + format: int32 + type: integer type: object queries: description: QueryLimits defines the limit applied on querying @@ -247,6 +257,16 @@ spec: on ingestion path. Units in Bytes. format: int32 type: integer + perStreamRateLimit: + description: PerStreamRateLimit defines the maximum + byte rate per second per stream. Units MB. + format: int32 + type: integer + perStreamRateLimitBurst: + description: PerStreamRateLimitBurst defines the maximum + burst bytes per stream. Units MB. + format: int32 + type: integer type: object queries: description: QueryLimits defines the limit applied on querying diff --git a/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml b/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml index a6615b8feba5..974268e70932 100644 --- a/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml +++ b/operator/config/crd/bases/loki.grafana.com_lokistacks.yaml @@ -113,6 +113,16 @@ spec: on ingestion path. Units in Bytes. format: int32 type: integer + perStreamRateLimit: + description: PerStreamRateLimit defines the maximum byte + rate per second per stream. Units MB. + format: int32 + type: integer + perStreamRateLimitBurst: + description: PerStreamRateLimitBurst defines the maximum + burst bytes per stream. Units MB. + format: int32 + type: integer type: object queries: description: QueryLimits defines the limit applied on querying @@ -230,6 +240,16 @@ spec: on ingestion path. Units in Bytes. format: int32 type: integer + perStreamRateLimit: + description: PerStreamRateLimit defines the maximum + byte rate per second per stream. Units MB. + format: int32 + type: integer + perStreamRateLimitBurst: + description: PerStreamRateLimitBurst defines the maximum + burst bytes per stream. Units MB. + format: int32 + type: integer type: object queries: description: QueryLimits defines the limit applied on querying diff --git a/operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml b/operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml index 80c30ad87cd7..2a578d4b907b 100644 --- a/operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml +++ b/operator/config/manifests/bases/loki-operator.clusterserviceversion.yaml @@ -196,6 +196,18 @@ spec: path: limits.global.ingestion.maxLineSize x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number + - description: PerStreamRateLimit defines the maximum byte rate per second per + stream. Units MB. + displayName: Maximum byte rate per second per stream (in MB) + path: limits.global.ingestion.perStreamRateLimit + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: PerStreamRateLimitBurst defines the maximum burst bytes per stream. + Units MB. + displayName: Maximum burst bytes per stream (in MB) + path: limits.global.ingestion.perStreamRateLimitBurst + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number - description: CardinalityLimit defines the cardinality limit for index queries. displayName: Cardinality Limit path: limits.global.queries.cardinalityLimit @@ -268,6 +280,18 @@ spec: path: limits.tenants.ingestion.maxLineSize x-descriptors: - urn:alm:descriptor:com.tectonic.ui:number + - description: PerStreamRateLimit defines the maximum byte rate per second per + stream. Units MB. + displayName: Maximum byte rate per second per stream (in MB) + path: limits.tenants.ingestion.perStreamRateLimit + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number + - description: PerStreamRateLimitBurst defines the maximum burst bytes per stream. + Units MB. + displayName: Maximum burst bytes per stream (in MB) + path: limits.tenants.ingestion.perStreamRateLimitBurst + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:number - description: CardinalityLimit defines the cardinality limit for index queries. displayName: Cardinality Limit path: limits.tenants.queries.cardinalityLimit diff --git a/operator/docs/lokistack/sop.md b/operator/docs/lokistack/sop.md index 2e27b5a6e321..8c437bd53b67 100644 --- a/operator/docs/lokistack/sop.md +++ b/operator/docs/lokistack/sop.md @@ -202,6 +202,8 @@ A service(s) is rate limiting at least 10% of all incoming requests. | `label_value_too_long` | `maxLabelValueLength` | | `line_too_long` | `maxLineSize` | | `max_label_names_per_series` | `maxLabelNamesPerSeries` | +| `per_stream_rate_limit` | `perStreamRateLimit`, `perStreamRateLimitBurst` | + ## Loki Storage Slow Write diff --git a/operator/docs/operator/api.md b/operator/docs/operator/api.md index c300239b2941..71d5cbac55ae 100644 --- a/operator/docs/operator/api.md +++ b/operator/docs/operator/api.md @@ -357,6 +357,30 @@ int32
MaxLineSize defines the maximum line size on ingestion path. Units in Bytes.
+perStreamRateLimit
PerStreamRateLimit defines the maximum byte rate per second per stream. Units MB.
+perStreamRateLimitBurst
PerStreamRateLimitBurst defines the maximum burst bytes per stream. Units MB.
+