How raedbari/smart-devops-deployment works
1. Purpose and Delivery Model
This repository is infrastructure and architecture documentation for a multi-tenant Smart DevOps Platform, rather than application source code. It deploys a frontend/API/PostgreSQL platform to Kubernetes and layers tenant isolation, ingress/TLS, monitoring, alerting, and blue-green operational workflows over it. Main operational entry points are Kubernetes manifests under K8s/ and implementation guidance in docs/overview.md and docs/deployment-guide.md.
2. Platform Application Boundary
The user/admin UI is deployed independently from the backend API:
• Frontend workload and internal exposure: K8s/frontend/frontend-deployment.yaml, K8s/frontend/frontend-service.yaml
• Backend API workload, service, and runtime configuration: K8s/Backend/deployment.yaml, K8s/Backend/service.yaml, K8s/Backend/platform-api-config.yaml
The documented stack is Next.js/TypeScript for the UI and FastAPI/Python/SQLAlchemy for the API. The backend is the control-plane boundary: it implements authentication/approval, tenant provisioning, deployment orchestration, blue-green operations, alert handling, and Kubernetes API interaction.
3. Request, Identity, and Tenant Lifecycle
External traffic enters through separate frontend and API ingress resources: K8s/Ingress/ingress-smartdevops.yaml and K8s/Ingress/ingress-platform-api.yaml. TLS certificates are issued through cert-manager resources: K8s/Certificates/cluster-issuer-prod.yaml, K8s/Certificates/smartdevops-cert.yaml.
Primary control flow is: user signup → pending account → administrator approval → tenant namespace/access setup → tenant deployment management through the platform. Tenant isolation is intended to be namespace-centric, with Kubernetes authorization and network controls described in docs/Tenant-isolation.md, K8s/RBAC/rbac-cluster-read.yaml, and K8s/Network/GlobalNetworkPolicy.yaml.
4. Kubernetes Deployment Control Plane
The backend needs elevated Kubernetes permissions to create or manage platform resources, represented by K8s/Backend/clusterrole-platform-deployer.yaml and K8s/Backend/rolebinding-platform-deployer.yaml. Its local runtime RBAC is also represented in K8s/Backend/rbac.yaml.
The platform abstracts raw Kubernetes resources from tenants: backend-driven actions create/manage tenant workloads and support blue-green release stages—prepare a parallel version, validate it, promote traffic, or roll back. The workflow is architecturally specified in docs/bluegreen.md; concrete tenant application manifests are not present in this tree.
5. Stateful Data Boundary
PostgreSQL is deployed in-cluster as the platform database:
K8s/Postgress/postgres-deployment.yaml and K8s/Postgress/postgres-pv.yaml.
The API persists platform state such as accounts, approval state, tenant metadata, and deployment-related records through SQLAlchemy. The persistent-volume manifest makes database storage an infrastructure dependency and a likely availability boundary; no managed database integration is represented.
6. Observability and Alert Pipeline
Prometheus evaluates platform/application metrics and alert rules via K8s/Monitoring/prometheus-rule-smartdevops.yaml and K8s/Monitoring/alert-rules.yaml. Grafana configuration is supplied through K8s/grafana-values.yaml.
Alertmanager receives firing alerts and routes notifications to email and/or backend webhooks through K8s/Monitoring/alertmanager.yaml; the backend is therefore both a deployment controller and an alert-integration endpoint. Monitoring data also feeds the documented billing/usage-visibility concept, but no billing service or data pipeline is present.
7. Operational Boundaries and Dependencies
Material runtime dependencies are Kubernetes, PostgreSQL persistent storage, cert-manager/issuers, Prometheus, Grafana, and Alertmanager. Cluster-wide privileges, ingress/TLS, global network policy, and monitoring each cross tenant/application boundaries and require careful operational ownership. Supporting security, monitoring, authentication, and deployment guidance resides in docs/security.md, docs/monitoring.md, and docs/authentication.md.
Main entry points: deployment.yaml Platform API · prometheus-rule-smartdevops.yaml Prometheus rules · ingress-smartdevops.yaml Frontend ingress · ingress-platform-api.yaml API ingress
Components 17
Edge Access
- Frontend ingress
K8s/Ingress/ingress-smartdevops.yaml - API ingress
K8s/Ingress/ingress-platform-api.yaml - cert-manager TLS
K8s/Certificates/cluster-issuer-prod.yaml
Platform Runtime
- Next.js frontend · Independently deployed user and admin UI.
K8s/frontend/frontend-deployment.yaml - Platform API · Authentication, approval, tenant provisioning, deployment control, and alert endpoint.
K8s/Backend/deployment.yaml - API runtime config
K8s/Backend/platform-api-config.yaml - Platform PostgreSQL · Stores accounts, approval state, tenant metadata, and deployment records.
K8s/Postgress/postgres-deployment.yaml - PostgreSQL storage · In-cluster stateful availability boundary.
K8s/Postgress/postgres-pv.yaml
Cluster Controls
- Tenant lifecycle · Approval creates namespace-scoped tenant access before deployment management.
docs/Tenant-isolation.md - Tenant workloads · Created and managed by the platform; concrete manifests are not in this repository.
- Blue-green workflow · Prepare, validate, promote traffic, or roll back a parallel release.
docs/bluegreen.md - Platform deployer RBAC · Elevated permissions for backend resource management.
K8s/Backend/clusterrole-platform-deployer.yaml - Tenant isolation controls · Namespace-centric authorization and cross-tenant network controls.
K8s/Network/GlobalNetworkPolicy.yaml
Observability
- Prometheus rules
K8s/Monitoring/prometheus-rule-smartdevops.yaml - Alertmanager · Routes firing alerts to email and backend webhooks.
K8s/Monitoring/alertmanager.yaml - Grafana
K8s/grafana-values.yaml
Other components
- Users & admins
Connections 20
- Users & admins → Frontend ingress: UI requests
- Users & admins → API ingress: API requests
- cert-manager TLS → Frontend ingress: certificates
- cert-manager TLS → API ingress: certificates
- Frontend ingress → Next.js frontend: routes
- API ingress → Platform API: routes
- Next.js frontend → Platform API: platform API calls
- API runtime config → Platform API: runtime settings
- Platform API → Platform PostgreSQL: persists platform state
- Platform PostgreSQL → PostgreSQL storage: persists data
- Platform API → Tenant lifecycle: approves and provisions
- Tenant lifecycle → Tenant workloads: creates tenant scope
- Platform API → Blue-green workflow: orchestrates
- Blue-green workflow → Tenant workloads: deploys and promotes
- Platform deployer RBAC → Platform API: grants cluster access
- Tenant isolation controls → Tenant workloads: enforces isolation
- Prometheus rules → Alertmanager: firing alerts
- Alertmanager → Platform API: webhook notifications
- Prometheus rules → Grafana: metrics visibility
- Tenant workloads → Prometheus rules: platform metrics