An ArgoCD Proxy enhances the performance of the ArgoCD list application API by integrating with Redis and performing in-memory RBAC filtering. This significantly improves the efficiency of application queries and reduces latency in large-scale environments.
- Redis Cache Integration: Reads application data from Redis instead of querying Kubernetes Application CRs.
- In-Memory RBAC Filtering: Drop the use of the casbin package but use in-memory filtering instead.
- Improved Performance: Optimized for faster response times and reduced resource consumption.
- Seamless Integration: Works in conjunction with argocd-watcher to keep the Redis cache up-to-date.
- Scalable API Performance: Ideal for environments with numerous applications, improving API responsiveness.
- Real-Time Application Data: Provides quick access to updated application information through Redis.
- ArgoCD: A working ArgoCD setup.
- Redis: A running Redis instance to store application data.
- Kubernetes: A Kubernetes cluster where ArgoCD is deployed.
- Go: Installed Go environment for building and running the proxy.
-
Clone this repository:
git clone [email protected]:hsiaoairplane/argocd-proxy.git cd argocd-proxy
-
Build the proxy:
go build -o argocd-proxy *.go
-
Deploy to Kubernetes:
- Ensure Redis is running and accessible.
- Configure the proxy to connect to the Redis instance.
- Create a Kubernetes deployment for the proxy.
Example deployment:
apiVersion: apps/v1 kind: Deployment metadata: name: argocd-proxy spec: replicas: 1 selector: matchLabels: app: argocd-proxy template: metadata: labels: app: argocd-proxy spec: containers: - name: argocd-proxy image: <your-image> command: ["argocd-proxy"]
-
Run the proxy locally for testing:
./argocd-proxy --redis-address=<redis-address> --redis-db=<redis-db-index> --proxy-backend=<path-to-the-backend>
- Flags:
--redis-address
: Redis server address.--redis-db
: Redis DB index.--proxy-backend
: Proxy backend address.