Skip to content

Commit

Permalink
Query-frontend: fix missing redis username config (#7224)
Browse files Browse the repository at this point in the history
* add username cfg to rueidis client

Signed-off-by: Thibault Mange <[email protected]>

* update changelog

Signed-off-by: Thibault Mange <[email protected]>

---------

Signed-off-by: Thibault Mange <[email protected]>
  • Loading branch information
thibaultmg authored Mar 25, 2024
1 parent b721f09 commit b55ffbc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
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

0 comments on commit b55ffbc

Please sign in to comment.