This repository contains a simple demo for deploying applications on OpenShift using ArgoCD. It demonstrates:
- ArgoCD Application for Redis Enterprise Cluster
- ArgoCD ApplicationSet for Redis Enterprise Databases
- Kustomize overlays for common and specific database configurations
- OpenShift cluster with ArgoCD operator installed
- Redis Enterprise operator installed (already installed in your cluster)
- Clone this repository
- Push to GitHub under your account
- Install the Redis Enterprise Operator
- In ArgoCD, create the cluster Application:
argocd-apps/redis-cluster-app.yaml - Create the databases ApplicationSet:
argocd-apps/redis-databases-appset.yaml - Commit and push changes; ArgoCD will reconcile the cluster and database applications
argocd-apps/: ArgoCD Application and ApplicationSet manifestsbases/: Base Kustomize configurations for Redis cluster and databasesoverlays/: Kustomize overlays for database types (cache, persistent) with common configurationsdatabases/: Database-specific configurations (each subdir creates an ArgoCD app via ApplicationSet)- Each subdirectory contains
kustomization.yaml,patch.yaml, and optionallyroute-patch.yaml - Extend an overlay and customize the patch files with specific settings
- Each subdirectory contains
- Create a new directory under
databases/by copying an existing one such asdatabases/cache-dev - Update
patch.yamlwith the new database name, labels, and namespace - Update
route-patch.yamlwith the new route name and namespace - Commit and push
- The
redis-databasesApplicationSet will generate a new ArgoCD Application for the directory
- Delete the database directory from
databases/ - Commit and push
- Refresh the
redis-databasesApplicationSet if ArgoCD does not notice the deletion quickly - Once the ApplicationSet reconciles, it removes the generated Application and ArgoCD prunes the RedisEnterpriseDatabase and Route
ArgoCD does not always notice new or removed databases/* directories immediately. This is normal when the Git generator has not reconciled yet.
If a new database does not appear, or a removed database is still present, refresh the redis-databases ApplicationSet:
oc patch applicationset redis-databases -n openshift-gitops --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'If a generated Application is stuck after the cluster becomes healthy again, a manual sync can help:
oc patch application <app-name> -n openshift-gitops --type merge -p '{"operation":{"initiatedBy":{"username":"admin"},"sync":{"prune":true}}}'It is normal in some OpenShift GitOps installations for ApplicationSet not to appear as a dedicated menu in the ArgoCD UI. Depending on the console integration, you may only see the generated Application objects. In that case, use the OpenShift web console or oc to refresh the ApplicationSet.
Pre-configured database profiles:
- cache: Optimized for temporary data - 512MB memory, LRU eviction, no persistence, no replication
- persistent: Optimized for critical data - 512MB memory, no eviction, AOF persistence, no replication
Create additional overlays for your specific use cases (e.g., overlays/session/, overlays/queue/)