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

Khaines/improved redis options #1923

Merged

Conversation

khaines
Copy link
Contributor

@khaines khaines commented Dec 18, 2019

What this PR does: Enhancement to the redis cache package to support specifying a password and enabling TLS communication, via config. Enables the use of hosted Redis services such as Microsoft Azure Cache for Redis.

Checklist

  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Ken Haines <khaines@microsoft.com>
Signed-off-by: Ken Haines <khaines@microsoft.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! I've just left a couple of comments.

CHANGELOG.md Outdated
@@ -15,6 +15,7 @@
* [FEATURE] The distributor can now drop labels from samples (similar to the removal of the replica label for HA ingestion) per user via the `distributor.drop-label` flag. #1726
* [FEATURE] Added `global` ingestion rate limiter strategy. Deprecated `-distributor.limiter-reload-period` flag. #1766
* [FEATURE] Added support for Microsoft Azure blob storage to be used for storing chunk data. #1913
* [ENHANCEMENT] Added `password` and `enableTLS` options to redis cache configuration. Enables usage of Microsoft Azure Cache for Redis service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enableTLS > enable_tls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. corrected

@@ -34,6 +36,8 @@ func (cfg *RedisConfig) RegisterFlagsWithPrefix(prefix, description string, f *f
f.DurationVar(&cfg.Expiration, prefix+"redis.expiration", 0, description+"How long keys stay in the redis.")
f.IntVar(&cfg.MaxIdleConns, prefix+"redis.max-idle-conns", 80, description+"Maximum number of idle connections in pool.")
f.IntVar(&cfg.MaxActiveConns, prefix+"redis.max-active-conns", 0, description+"Maximum number of active connections in pool.")
f.StringVar(&cfg.Password, prefix+"redis.password", "", "password to use when connecting to redis.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add description+ to the help message and starts the help message with a capital letter, due to how the final message is composed.

Same feedback applies to the next CLI flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pracucci . Fixed this.

@khaines khaines force-pushed the khaines/improved-redis-options branch from 81b8dae to 566ba5d Compare January 6, 2020 16:12
Signed-off-by: Ken Haines <khaines@microsoft.com>
@khaines khaines merged commit 7127724 into cortexproject:master Jan 6, 2020
@khaines khaines deleted the khaines/improved-redis-options branch January 6, 2020 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants