Skip to content

Commit

Permalink
fix: support specifying username/password for redis holding manifests…
Browse files Browse the repository at this point in the history
… in argocd-server (#16786)

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
  • Loading branch information
alexmt authored Jan 9, 2024
1 parent 40760eb commit c5b9c67
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions util/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,14 @@ func AddCacheFlagsToCmd(cmd *cobra.Command, opts ...Options) func() (*Cache, err
}
password := os.Getenv(envRedisPassword)
username := os.Getenv(envRedisUsername)
if opt.FlagPrefix != "" {
if val := os.Getenv(opt.getEnvPrefix() + envRedisUsername); val != "" {
username = val
}
if val := os.Getenv(opt.getEnvPrefix() + envRedisPassword); val != "" {
password = val
}
}
maxRetries := env.ParseNumFromEnv(envRedisRetryCount, defaultRedisRetryCount, 0, math.MaxInt32)
compression, err := CompressionTypeFromString(compressionStr)
if err != nil {
Expand Down

0 comments on commit c5b9c67

Please sign in to comment.