-
Notifications
You must be signed in to change notification settings - Fork 50
fix: allow agent redis ingress and remove restrictive egress in NetworkPolicy #618
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: EunJiJung <[email protected]>
Signed-off-by: EunJiJung <[email protected]>
Signed-off-by: EunJiJung <[email protected]>
|
I’m looking for a way to either deploy a redis-proxy on the agent side as well, or find a better approach to allow the agent Pods to access Redis through ingress. |
Hm, why would you do that? The Redis proxy is a component which is used by the Argo CD API server, so that it can access data stored on the Agent's Redis. The Redis proxy should be running on the control plane only. |
In practice, the Redis proxy only runs on the control plane, while the agent only hosts its own Redis server. The Redis proxy is used only when the principal needs to access the agent’s Redis through the proxy. However, in my tests, the agent couldn’t access its own argocd-redis because there was no ingress. Does this mean that the principal wasn’t actually accessing its own Redis during execution? |
Regarding your earlier comment, please ignore my previous suggestion about deploying a Redis proxy on the agent side. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #618 +/- ##
=======================================
Coverage 45.90% 45.90%
=======================================
Files 90 90
Lines 12103 12103
=======================================
Hits 5556 5556
Misses 6101 6101
Partials 446 446 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7bfb654 to
790ab84
Compare
Signed-off-by: Eunji <[email protected]>
What does this PR do / why we need it:
This PR addresses the recurring issues of Redis connection failures and DNS lookup errors observed in argocd-agent environments.
The default Argo CD Kustomize setup (install/argo-cd/*) does not define argocd-agent-agent or argocd-agent-principal as allowed sources to access argocd-redis.
In other words, the existing argocd-redis-network-policy follows the base Argo CD configuration and does not include any agent-related Pods in its ingress rules.
As a result, the agent fails to connect to Redis and repeatedly outputs the following error:
While the principal cluster has mitigated this issue by adding a redis-proxy#618 (comment), the agent cluster continues to experience the same connection failures.To fix this, I propose updating all Kustomize variants that extend Argo CD (such as argocd-managed and argocd-autonomous) to include argocd-agent-agent as an allowed source in the Redis ingress policy.
Additionally, a more critical issue lies in the egress rules.
Because egress is currently restricted, both agent and principal pods cannot reach essential internal services such as argocd-server, controller, or even coredns. this also causes DNS lookups for service names to fail.
Therefore, this PR removes the egress restriction to restore proper internal communication between components.
Which issue(s) this PR fixes:
Fixes #566, #611
Related discussion: #510 (comment)
Related PR: #574
How to test changes / Special notes to the reviewer:
Assumption:
The principal cluster and agent have already successfully established a TLS connection.
Reproduction steps
When egress is defined, both principal and agent clusters experience DNS lookup failures.
This error blocks access to argocd-server, controller, repo-server, and coredns.
Checklist