argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.34k stars 5.27k forks source link

Enhance Redis client to support external Redis cache #13812

Open pdrastil opened 1 year ago

pdrastil commented 1 year ago

Summary

I've tried to use redis.server in argocd-cmd-params-cm to leverage AWS Elasticache Redis cluster to externalise Argo CD caching, however it seems that client implementation is not fully compatible with this approach.

Motivation

For production grade setups it would be beneficial to have managed Redis HA cache with automatic failovers directly in cloud provider.

Proposal

To make this working I've noticed 2 outstanding issues:

Unable to load data: error getting cached app managed resources: MOVED 779 <HOSTNAME>:6379
elouanKeryell-Even commented 10 months ago

I've tried to use redis.server in argocd-cmd-params-cm to leverage AWS Elasticache Redis cluster to externalise Argo CD caching, however it seems that client implementation is not fully compatible with this approach.

What were the errors you encountered?

I'm trying to do the same things with an AWS Elasticache Replication Group, and am encountering this error in the server logs:

Failed to resync revoked tokens. retrying again in 1 minute: i/o timeout

Yet, connectivity is open since I can telnet to Elasticache:

# telnet 10.36.12.135 6379
Trying 10.36.12.135...
Connected to 10.36.12.135.
Escape character is '^]'.

So I'm wondering if there is something special with Elasticache that does make it not work. Maybe it is because I enabled Transit Encryption.

EDIT

I disabled Transit Encryption and it fixed the i/o timeout errors

However, I confirm it still doesn't work because of the MOVED instructions, as @pdrastil mentionned. Application Controller logs are filled with this warning:

Failed to save clusters info: MOVED 3861 10.36.12.18:6379
lucasfcnunes commented 3 months ago

@pdrastil Another issue is the possibility of selecting the db number you want.

See redis[s]://[[username][:password]@][host][:port][/db-number]

Hronom commented 1 month ago

Pretty major blocker when you deploy in cloud like AWS and wanna use external redis.

I think it's just need to update redis client on the latest versions, since this sounds like a basic things, strange that it not works.