yusefgamal/gitops-observability-platform

GitHub: yusefgamal/gitops-observability-platform

Stars: 0 | Forks: 0

# GitOps Observability Platform Production-style DevOps portfolio project showing how to build, scan, ship, deploy, observe, and troubleshoot a containerized API on Kubernetes. ## What this demonstrates - Dockerized FastAPI service with health, readiness, metrics, latency, and error simulation endpoints - GitHub Actions CI for tests, image build, Trivy scanning, and GHCR publishing - Kubernetes manifests for Deployment, Service, Ingress, ConfigMap, Secret, HPA, and monitoring integration - GitOps deployment model with Argo CD - Prometheus metrics, alert rules, Grafana dashboard, and Loki logging manifests - Terraform foundation for an EKS-ready AWS network - Incident response documentation for a latency event ## Architecture Developer push -> GitHub Actions -> Tests + image scan + GHCR image publish -> Kubernetes manifests in Git -> Argo CD sync -> Kubernetes workload -> Prometheus + Grafana + Loki ## Project layout . |-- app/ # FastAPI service |-- tests/ # Pytest tests |-- k8s/ | |-- app/ # Application manifests | |-- argocd/ # Argo CD Application | |-- logging/ # Loki/Promtail values | `-- monitoring/ # Prometheus rules and Grafana dashboard config |-- terraform/ # AWS VPC foundation |-- dashboards/ # Dashboard source JSON |-- incidents/ # Incident response writeups |-- scripts/ # Local helper scripts |-- .github/workflows/ # CI pipeline |-- Dockerfile |-- docker-compose.yml |-- Makefile `-- requirements.txt ## Run locally python -m venv .venv source .venv/bin/activate pip install -r requirements.txt uvicorn app.main:app --reload Open: - API: http://localhost:8000 - Health: http://localhost:8000/health - Readiness: http://localhost:8000/ready - Metrics: http://localhost:8000/metrics ## Run with Docker docker compose up --build ## Run tests pytest ## Deploy locally with kind or minikube kubectl apply -f k8s/app/ kubectl get pods -n gitops-observability kubectl port-forward -n gitops-observability svc/orders-api 8000:80 ## GitOps with Argo CD 1. Install Argo CD in your cluster. 2. Push this repository to GitHub. 3. Apply the Argo CD Application: kubectl apply -f k8s/argocd/application.yml Argo CD will sync the Kubernetes manifests from `k8s/app`. ## Observability The app exposes Prometheus metrics at `/metrics`, including request count, latency, and simulated failure behavior. Suggested install path: Then install: ## Incident simulation Trigger latency: curl http://localhost:8000/simulate-latency Trigger errors: curl http://localhost:8000/simulate-error Then inspect: - Prometheus metrics - Grafana dashboard - Loki logs - Alert rules in `k8s/monitoring/prometheus-rules.yml` - Incident writeup in `incidents/incident-api-latency.md` ## Suggested GitHub repo description Production-style GitOps observability platform with Kubernetes, Argo CD, Prometheus, Grafana, Loki, GitHub Actions, Docker, and incident response documentation.