Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

169 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Redis Enterprise on OpenShift - GitOps Reference Architecture

Production-grade GitOps-based deployment and management of Redis Enterprise on Red Hat OpenShift

OpenShift Redis Enterprise Argo CD Gatekeeper


πŸ“‹ Overview

This repository provides a complete enterprise reference architecture for deploying and managing Redis Enterprise at scale using GitOps principles on Red Hat OpenShift.

Designed for:

  • βœ… Enterprise customers (including regulated industries like banking)
  • βœ… Multi-team environments (10-100+ databases)
  • βœ… Professional Services engagements
  • βœ… Database-as-a-Service (DBaaS) foundations

🎯 Quick Start

Prerequisites

  • Red Hat OpenShift 4.x cluster
  • Redis Enterprise Operator installed
  • Red Hat OpenShift GitOps (Argo CD) installed
  • oc CLI configured and logged in

Get Started in 5 Minutes

# Clone repository
git clone https://github.com/alan-teodoro/poc-gitops.git
cd poc-gitops

# Follow step-by-step guide
cat docs/ARGOCD_IMPLEMENTATION_GUIDE.md

πŸ“š Complete implementation guide: docs/ARGOCD_IMPLEMENTATION_GUIDE.md


✨ Key Features

πŸ” Multi-Tenant Governance

  • Argo CD AppProjects for team isolation
  • Namespace-based resource segregation
  • RBAC for fine-grained access control

πŸ“Š Resource Management

  • ResourceQuotas per namespace (CPU, memory, storage)
  • LimitRanges for container limits
  • Different profiles for dev/prod environments

πŸ›‘οΈ Policy Enforcement

  • OPA Gatekeeper for admission control
  • Automated validation of Redis configurations
  • Prevent data loss (immutable shardCount)
  • Enforce standards (mandatory labels, memory limits)

πŸš€ GitOps Automation

  • Declarative infrastructure as code
  • Auto-sync from Git to cluster
  • Self-healing capabilities
  • Audit trail via Git history

πŸ”§ Multi-Namespace Support

  • Operator in dedicated namespace
  • Cluster in operator namespace
  • Databases in separate namespaces (dev/prod isolation)

πŸ—οΈ Architecture

Repository Structure

.
β”œβ”€β”€ README.md                           # This file
β”œβ”€β”€ docs/                               # Documentation
β”‚   β”œβ”€β”€ ARGOCD_IMPLEMENTATION_GUIDE.md         # 🎯 START HERE - Step-by-step guide
β”‚   β”œβ”€β”€ TROUBLESHOOTING.md              # Common issues and solutions
β”‚   β”œβ”€β”€ HELM_ARCHITECTURE.md            # Helm charts explanation
β”‚   β”œβ”€β”€ MULTI_NAMESPACE.md              # Multi-namespace architecture
β”‚   └── architecture/
β”‚       └── ADR-001-gitops-governance.md
β”‚
β”œβ”€β”€ platform/                           # Platform-level resources
β”‚   β”œβ”€β”€ argocd/projects/                # AppProjects (multi-tenancy)
β”‚   β”œβ”€β”€ quotas/                         # ResourceQuota & LimitRange
β”‚   β”œβ”€β”€ policies/                       # OPA Gatekeeper policies
β”‚   └── operators/                      # Operator configurations
β”‚
β”œβ”€β”€ helm-charts/                        # Helm charts
β”‚   β”œβ”€β”€ redis-enterprise-cluster/       # REC chart
β”‚   β”œβ”€β”€ redis-enterprise-database/      # REDB chart
β”‚   └── redis-multi-namespace-rbac/     # Multi-namespace RBAC
β”‚
└── clusters/                           # Cluster configurations
    └── orders/                         # Example: Orders cluster
        β”œβ”€β”€ cluster.yaml                # Cluster configuration
        β”œβ”€β”€ rbac.yaml                   # RBAC configuration
        β”œβ”€β”€ argocd-cluster.yaml         # Argo CD Application (cluster)
        β”œβ”€β”€ argocd-rbac.yaml            # Argo CD Application (RBAC)
        β”œβ”€β”€ namespaces/                 # Namespace definitions
        └── databases/                  # Database configurations
            β”œβ”€β”€ cache/                  # Cache database (dev/prod)
            └── session/                # Session database (dev/prod)

Technology Stack

Component Technology Purpose
Container Platform Red Hat OpenShift 4.x Kubernetes distribution
Database Redis Enterprise 8.0.10 In-memory database
GitOps Red Hat OpenShift GitOps (Argo CD) Continuous delivery
Templating Helm 3.x Package management
Policy Engine OPA Gatekeeper Admission control
Operator Redis Enterprise Operator Lifecycle management

πŸ“š Documentation

Document Description
ARGOCD_IMPLEMENTATION_GUIDE.md 🎯 START HERE - Complete step-by-step implementation guide
OBSERVABILITY.md πŸ“Š Monitoring with Prometheus and Grafana
TROUBLESHOOTING.md Common production issues and solutions
HELM_ARCHITECTURE.md Helm charts architecture and usage
MULTI_NAMESPACE.md Multi-namespace support explanation
ADR-001 Architectural decision: GitOps governance

πŸš€ What You'll Deploy

Following the implementation guide, you'll deploy:

Phase 0: Governance

  • βœ… Argo CD AppProjects (platform-team, team-orders)

Phase 1: Namespaces

  • βœ… Database namespaces (redis-orders-dev, redis-orders-prod)

Phase 2: Resource Management

  • βœ… ResourceQuotas (dev: 4 CPU/8Gi RAM, prod: 16 CPU/32Gi RAM)
  • βœ… LimitRanges (container limits)

Phase 3: Policy Enforcement

  • βœ… Gatekeeper Operator & Instance
  • βœ… Policy Templates (mandatory labels, memory limits, immutable fields)
  • βœ… Constraints (enforcement rules)

Phase 4: Redis Enterprise

  • βœ… Multi-namespace RBAC
  • βœ… Redis Enterprise Cluster (3 nodes)
  • βœ… Redis Databases (cache, session - dev/prod)
  • βœ… Routes for external access

🎯 Use Cases

1. Development Teams

  • Self-service database provisioning
  • Isolated dev/prod environments
  • Automated compliance validation

2. Platform Teams

  • Centralized governance
  • Resource quota management
  • Policy enforcement
  • Audit trail via Git

3. DBaaS (Database-as-a-Service)

  • Multi-tenant database platform
  • Automated provisioning
  • Standardized configurations
  • Cost allocation (chargeback)

πŸ”§ Adding New Resources

Add a New Cluster

# Copy orders cluster as template
cp -r clusters/orders clusters/payments

# Edit configuration
vim clusters/payments/cluster.yaml
vim clusters/payments/argocd-cluster.yaml

# Apply
oc apply -f clusters/payments/argocd-cluster.yaml

Add a New Database

# Copy existing database as template
cp clusters/orders/databases/cache/dev.yaml \
   clusters/orders/databases/analytics/dev.yaml

# Edit configuration
vim clusters/orders/databases/analytics/dev.yaml

# Create Argo CD Application
cp clusters/orders/databases/cache/argocd-dev.yaml \
   clusters/orders/databases/analytics/argocd-dev.yaml

# Apply
oc apply -f clusters/orders/databases/analytics/argocd-dev.yaml

πŸ›‘οΈ Security & Compliance

Implemented Controls

  • βœ… Namespace isolation (multi-tenancy)
  • βœ… RBAC (role-based access control)
  • βœ… Resource quotas (prevent resource exhaustion)
  • βœ… Policy enforcement (automated validation)
  • βœ… Audit trail (Git history)
  • βœ… Immutability (prevent data loss)

Compliance Features

  • βœ… Segregation of duties (AppProjects)
  • βœ… Change tracking (Git commits)
  • βœ… Approval workflow (Git pull requests)
  • βœ… Automated validation (Gatekeeper policies)

πŸ“Š Monitoring & Observability

Production-Grade Implementation ⭐

  • βœ… 40+ Production-Tested Alerts - Based on official Redis Enterprise best practices
  • βœ… Official Grafana Dashboards - Cluster, Database, Node, Shard monitoring
  • βœ… v2 Prometheus Metrics - Latest metrics from Redis Enterprise 8.0.10
  • βœ… Predictive Alerts - "Database will be full in 2 hours"
  • βœ… Certificate & License Monitoring - Prevent unexpected expirations
  • βœ… Cluster Quorum Monitoring - Detect split-brain scenarios
  • βœ… ServiceMonitor - Automatic Prometheus scraping
  • βœ… Runbook Links - Every alert links to official Redis documentation

Alert Categories (40+ Alerts)

  • Latency (2) - Warning > 2ms, Critical > 5ms
  • Connections (2) - No connections, excessive connections
  • Throughput (2) - No requests, excessive requests
  • Capacity (2) - Database full, predictive capacity
  • Utilization (2) - Low hit ratio, unexpected evictions
  • Synchronization (4) - Replica/CRDT sync and lag
  • Nodes (5) - Health, storage, memory, CPU
  • Shards (5) - Health, CPU, hot shards, proxy
  • Certificates & License (6) - Expiration warnings, shard limits
  • Cluster Health (3) - Quorum, primary status, cluster down

Official Dashboards Available

  • Cluster Dashboard - Overall health and status
  • Database Dashboard - Performance and metrics
  • Node Dashboard - Resource monitoring
  • Shard Dashboard - Shard-level details
  • Active-Active - CRDB replication (optional)
  • Synchronization - Replication monitoring (optional)

πŸ“– Documentation:


🀝 Contributing

This is a reference architecture. To adapt for your environment:

  1. Fork the repository
  2. Modify configurations for your needs
  3. Test in non-production environment
  4. Document changes
  5. Deploy to production

πŸ“ License

This project is provided as-is for educational and reference purposes.


πŸ†˜ Support


πŸ™ Acknowledgments

  • Red Hat OpenShift team
  • Redis Enterprise team
  • Argo CD community
  • Open Policy Agent community

Built with ❀️ for Enterprise Redis deployments on OpenShift

About

poc gitops openshift

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages