Skip to content

Commit 6a68e9e

Browse files
authored
Remove deprecated options for setting runtime config file and reload period. (#4112)
* Remove deprecated options for setting runtime config file and reload period. Signed-off-by: Peter Štibraný <[email protected]> * CHANGELOG.md Signed-off-by: Peter Štibraný <[email protected]>
1 parent d3068f9 commit 6a68e9e

File tree

4 files changed

+1
-23
lines changed

4 files changed

+1
-23
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* [CHANGE] Blocks storage: removed the config option `-blocks-storage.bucket-store.index-cache.postings-compression-enabled`, which was deprecated in Cortex 1.6. Postings compression is always enabled. #4101
1515
* [CHANGE] Querier: removed the config option `-store.max-look-back-period`, which was deprecated in Cortex 1.6 and was used only by the chunks storage. You should use `-querier.max-query-lookback` instead. #4101
1616
* [CHANGE] Query Frontend: removed the config option `-querier.compress-http-responses`, which was deprecated in Cortex 1.6. You should use`-api.response-compression-enabled` instead. #4101
17+
* [CHANGE] Runtime-config / overrides: removed the config options `-limits.per-user-override-config` (use `-runtime-config.file`) and `-limits.per-user-override-period` (use `-runtime-config.reload-period`), both deprecated since Cortex 0.6.0. #4112
1718
* [FEATURE] The following features have been marked as stable: #4101
1819
- Shuffle-sharding
1920
- Querier support for querying chunks and blocks store at the same time

docs/configuration/config-file-reference.md

-10
Original file line numberDiff line numberDiff line change
@@ -4083,16 +4083,6 @@ The `limits_config` configures default and per-tenant limits imposed by Cortex s
40834083
# override is set, the encryption context will not be provided to S3. Ignored if
40844084
# the SSE type override is not set.
40854085
[s3_sse_kms_encryption_context: <string> | default = ""]
4086-
4087-
# File name of per-user overrides. [deprecated, use -runtime-config.file
4088-
# instead]
4089-
# CLI flag: -limits.per-user-override-config
4090-
[per_tenant_override_config: <string> | default = ""]
4091-
4092-
# Period with which to reload the overrides. [deprecated, use
4093-
# -runtime-config.reload-period instead]
4094-
# CLI flag: -limits.per-user-override-period
4095-
[per_tenant_override_period: <duration> | default = 10s]
40964086
```
40974087

40984088
### `redis_config`

pkg/cortex/modules.go

-5
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ func (t *Cortex) initRing() (serv services.Service, err error) {
148148
}
149149

150150
func (t *Cortex) initRuntimeConfig() (services.Service, error) {
151-
if t.Cfg.RuntimeConfig.LoadPath == "" {
152-
t.Cfg.RuntimeConfig.LoadPath = t.Cfg.LimitsConfig.PerTenantOverrideConfig
153-
t.Cfg.RuntimeConfig.ReloadPeriod = time.Duration(t.Cfg.LimitsConfig.PerTenantOverridePeriod)
154-
}
155-
156151
if t.Cfg.RuntimeConfig.LoadPath == "" {
157152
// no need to initialize module if load path is empty
158153
return nil, nil

pkg/util/validation/limits.go

-8
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ type Limits struct {
9494
S3SSEType string `yaml:"s3_sse_type" json:"s3_sse_type" doc:"nocli|description=S3 server-side encryption type. Required to enable server-side encryption overrides for a specific tenant. If not set, the default S3 client settings are used."`
9595
S3SSEKMSKeyID string `yaml:"s3_sse_kms_key_id" json:"s3_sse_kms_key_id" doc:"nocli|description=S3 server-side encryption KMS Key ID. Ignored if the SSE type override is not set."`
9696
S3SSEKMSEncryptionContext string `yaml:"s3_sse_kms_encryption_context" json:"s3_sse_kms_encryption_context" doc:"nocli|description=S3 server-side encryption KMS encryption context. If unset and the key ID override is set, the encryption context will not be provided to S3. Ignored if the SSE type override is not set."`
97-
98-
// Config for overrides, convenient if it goes here. [Deprecated in favor of RuntimeConfig flag in cortex.Config]
99-
PerTenantOverrideConfig string `yaml:"per_tenant_override_config" json:"per_tenant_override_config"`
100-
PerTenantOverridePeriod model.Duration `yaml:"per_tenant_override_period" json:"per_tenant_override_period"`
10197
}
10298

10399
// RegisterFlags adds the flags required to config this to the given FlagSet
@@ -152,10 +148,6 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) {
152148

153149
f.Var(&l.CompactorBlocksRetentionPeriod, "compactor.blocks-retention-period", "Delete blocks containing samples older than the specified retention period. 0 to disable.")
154150

155-
f.StringVar(&l.PerTenantOverrideConfig, "limits.per-user-override-config", "", "File name of per-user overrides. [deprecated, use -runtime-config.file instead]")
156-
_ = l.PerTenantOverridePeriod.Set("10s")
157-
f.Var(&l.PerTenantOverridePeriod, "limits.per-user-override-period", "Period with which to reload the overrides. [deprecated, use -runtime-config.reload-period instead]")
158-
159151
// Store-gateway.
160152
f.IntVar(&l.StoreGatewayTenantShardSize, "store-gateway.tenant-shard-size", 0, "The default tenant's shard size when the shuffle-sharding strategy is used. Must be set when the store-gateway sharding is enabled with the shuffle-sharding strategy. When this setting is specified in the per-tenant overrides, a value of 0 disables shuffle sharding for the tenant.")
161153
}

0 commit comments

Comments
 (0)