Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(operator): Add support for the volume API #13369

Merged
merged 14 commits into from
Jul 3, 2024
Merged
7 changes: 7 additions & 0 deletions operator/apis/loki/v1/lokistack_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,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"`
}

// BlockedQueryType defines which type of query a blocked query should apply to.
Expand Down
36 changes: 36 additions & 0 deletions operator/internal/manifests/internal/config/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -368,6 +370,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -795,6 +799,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -1154,6 +1160,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -1514,6 +1522,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -1912,6 +1922,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -2243,6 +2255,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 2m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -2683,6 +2697,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -3008,6 +3024,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 2m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -3506,6 +3524,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -3768,6 +3788,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -4031,6 +4053,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -4295,6 +4319,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -4595,6 +4621,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down Expand Up @@ -4895,6 +4923,8 @@ limits_config:
split_queries_by_interval: 30m
tsdb_max_query_parallelism: 512
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
allow_structured_metadata: true
memberlist:
abort_if_cluster_join_fails: true
Expand Down Expand Up @@ -5386,6 +5416,8 @@ limits_config:
per_stream_rate_limit_burst: 15MB
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
allow_structured_metadata: true
memberlist:
abort_if_cluster_join_fails: true
Expand Down Expand Up @@ -5561,6 +5593,8 @@ limits_config:
per_stream_rate_limit_burst: 15MB
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
allow_structured_metadata: true
memberlist:
abort_if_cluster_join_fails: true
Expand Down Expand Up @@ -5730,6 +5764,8 @@ limits_config:
max_cache_freshness_per_query: 10m
split_queries_by_interval: 30m
query_timeout: 1m
volume_enabled: true
volume_max_series: 1000
per_stream_rate_limit: 5MB
per_stream_rate_limit_burst: 15MB
shard_streams:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ limits_config:
cardinality_limit: {{ .Stack.Limits.Global.QueryLimits.CardinalityLimit }}
max_streams_matchers_per_query: 1000
query_timeout: {{ .Stack.Limits.Global.QueryLimits.QueryTimeout }}
volume_enabled: true
volume_max_series: 1000
jatinsu marked this conversation as resolved.
Show resolved Hide resolved
periklis marked this conversation as resolved.
Show resolved Hide resolved
{{- if .Retention.Enabled }}{{- with .Stack.Limits.Global.Retention }}
retention_period: {{.Days}}d
{{- with .Streams }}
Expand Down
Loading