Rename config for enforcing a minimum number of label matchers (#8940)

**What this PR does / why we need it**:
Followup PR for https://github.com/grafana/loki/pull/8918 renaming
config. See https://github.com/grafana/loki/pull/8918/files#r1151820792.

**Which issue(s) this PR fixes**:
Fixes https://github.com/grafana/loki-private/issues/699

**Special notes for your reviewer**:

**Checklist**
- [ ] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [x] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`

---------

Co-authored-by: Dylan Guedes <djmgguedes@gmail.com>
pull/8955/head
Salva Corts 3 years ago committed by GitHub
parent abc0fd26d2
commit 28a7733ede
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docs/sources/configuration/_index.md
  2. 2
      pkg/util/querylimits/propagation.go
  3. 4
      pkg/validation/limits.go

@ -2502,10 +2502,10 @@ shard_streams:
[blocked_queries: <blocked_query...>]
# Define a list of required selector labels.
[required_label_matchers: <list of strings>]
[required_labels: <list of strings>]
# Minimum number of label matchers a query should contain.
[required_number_label_matchers: <int>]
[minimum_labels_number: <int>]
```
### frontend_worker

@ -26,7 +26,7 @@ type QueryLimits struct {
MaxEntriesLimitPerQuery int `json:"maxEntriesLimitPerQuery,omitempty"`
QueryTimeout model.Duration `json:"queryTimeout,omitempty"`
RequiredLabels []string `json:"requiredLabels,omitempty"`
RequiredNumberLabels int `json:"requiredNumberLabelMatchers,omitempty"`
RequiredNumberLabels int `json:"minimumLabelsNumber,omitempty"`
MaxQueryBytesRead flagext.ByteSize `json:"maxQueryBytesRead,omitempty"`
}

@ -169,8 +169,8 @@ type Limits struct {
BlockedQueries []*validation.BlockedQuery `yaml:"blocked_queries,omitempty" json:"blocked_queries,omitempty"`
RequiredLabels []string `yaml:"required_label_matchers,omitempty" json:"required_label_matchers,omitempty" doc:"description=Define a list of required selector labels."`
RequiredNumberLabels int `yaml:"required_number_label_matchers,omitempty" json:"required_number_label_matchers,omitempty" doc:"description=Minimum number of label matchers a query should contain."`
RequiredLabels []string `yaml:"required_labels,omitempty" json:"required_labels,omitempty" doc:"description=Define a list of required selector labels."`
RequiredNumberLabels int `yaml:"minimum_labels_number,omitempty" json:"minimum_labels_number,omitempty" doc:"description=Minimum number of label matchers a query should contain."`
}
type StreamRetention struct {

Loading…
Cancel
Save