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

Query-frontend: fix missing redis username config #7224

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#7132](https://github.com/thanos-io/thanos/pull/7132) Documentation: fix broken helm installation instruction
- [#7134](https://github.com/thanos-io/thanos/pull/7134) Store, Compact: Revert the recursive block listing mechanism introduced in https://github.com/thanos-io/thanos/pull/6474 and use the same strategy as in 0.31. Introduce a `--block-discovery-strategy` flag to control the listing strategy so that a recursive lister can still be used if the tradeoff of slower but cheaper discovery is preferred.
- [#7122](https://github.com/thanos-io/thanos/pull/7122) Store Gateway: Fix lazy expanded postings estimate base cardinality using posting group with remove keys.
- [#7224](https://github.com/thanos-io/thanos/pull/7224) Query-frontend: Add Redis username to the client configuration.

### Added
- [#7194](https://github.com/thanos-io/thanos/pull/7194) Downsample: retry objstore related errors
Expand Down
2 changes: 2 additions & 0 deletions internal/cortex/chunk/cache/redis_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type RedisConfig struct {
Timeout time.Duration `yaml:"timeout"`
Expiration time.Duration `yaml:"expiration"`
DB int `yaml:"db"`
Username string `yaml:"username"`
Password flagext.Secret `yaml:"password"`
EnableTLS bool `yaml:"tls_enabled"`
InsecureSkipVerify bool `yaml:"tls_insecure_skip_verify"`
Expand Down Expand Up @@ -54,6 +55,7 @@ func NewRedisClient(cfg *RedisConfig) (*RedisClient, error) {
InitAddress: strings.Split(cfg.Endpoint, ","),
ShuffleInit: true,
Password: cfg.Password.Value,
Username: cfg.Username,
SelectDB: cfg.DB,
Dialer: net.Dialer{Timeout: cfg.Timeout},
ConnWriteTimeout: cfg.Timeout,
Expand Down
1 change: 1 addition & 0 deletions pkg/queryfrontend/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func NewCacheConfig(logger log.Logger, confContentYaml []byte) (*cortexcache.Con
Expiration: config.Expiration,
DB: config.Redis.DB,
Password: flagext.Secret{Value: config.Redis.Password},
Username: config.Redis.Username,
},
Background: cortexcache.BackgroundConfig{
WriteBackBuffer: config.Redis.MaxSetMultiConcurrency * config.Redis.SetMultiBatchSize,
Expand Down
Loading