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

remove multiple dots in redis flags #6476

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

won-js
Copy link

@won-js won-js commented Jan 3, 2025

Fixes #6459

cortex/cmd/cortex$ go run main.go -help | grep redis | grep tls
  -blocks-storage.bucket-store.chunks-cache.redis.tls-ca-path string
  -blocks-storage.bucket-store.chunks-cache.redis.tls-cert-path string
  -blocks-storage.bucket-store.chunks-cache.redis.tls-enabled
        Whether to enable tls for redis connection.
  -blocks-storage.bucket-store.chunks-cache.redis.tls-insecure-skip-verify
  -blocks-storage.bucket-store.chunks-cache.redis.tls-key-path string
  -blocks-storage.bucket-store.chunks-cache.redis.tls-server-name string
  -blocks-storage.bucket-store.index-cache.redis.tls-ca-path string
  -blocks-storage.bucket-store.index-cache.redis.tls-cert-path string
  -blocks-storage.bucket-store.index-cache.redis.tls-enabled
        Whether to enable tls for redis connection.
  -blocks-storage.bucket-store.index-cache.redis.tls-insecure-skip-verify
  -blocks-storage.bucket-store.index-cache.redis.tls-key-path string
  -blocks-storage.bucket-store.index-cache.redis.tls-server-name string
  -blocks-storage.bucket-store.metadata-cache.redis.tls-ca-path string
  -blocks-storage.bucket-store.metadata-cache.redis.tls-cert-path string
  -blocks-storage.bucket-store.metadata-cache.redis.tls-enabled
        Whether to enable tls for redis connection.
  -blocks-storage.bucket-store.metadata-cache.redis.tls-insecure-skip-verify
  -blocks-storage.bucket-store.metadata-cache.redis.tls-key-path string
  -blocks-storage.bucket-store.metadata-cache.redis.tls-server-name string
  -frontend.redis.tls-enabled
  -frontend.redis.tls-insecure-skip-verify

@friedrichg
Copy link
Member

@won-js thanks! looks good. Can you run make doc and commit the corresponding docs?

@@ -60,7 +59,7 @@ func (cfg *RedisClientConfig) RegisterFlagsWithPrefix(f *flag.FlagSet, prefix st
f.StringVar(&cfg.MasterName, prefix+"master-name", "", "Specifies the master's name. Must be not empty for Redis Sentinel.")
f.IntVar(&cfg.CacheSize, prefix+"cache-size", 0, "If not zero then client-side caching is enabled. Client-side caching is when data is stored in memory instead of fetching data each time. See https://redis.io/docs/manual/client-side-caching/ for more info.")
f.BoolVar(&cfg.TLSEnabled, prefix+"tls-enabled", false, "Whether to enable tls for redis connection.")
cfg.TLS.RegisterFlagsWithPrefix(prefix, f)
cfg.TLS.RegisterFlagsWithPrefix(prefix[:len(prefix)-1], f)
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocker to this PR. I wonder if we should just unify our flags to always remove . in its flag description and add . in the prefix instead

Copy link
Author

Choose a reason for hiding this comment

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

That's a good idea, but it seems like there would be a lot of code that needs to be changed.

Signed-off-by: won-js <[email protected]>
@pull-request-size pull-request-size bot added size/M and removed size/XS labels Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants