# sh3llendra/qoves-assignment architecture

> Architecture diagram of the GitHub repository sh3llendra/qoves-assignment, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sh3llendra/qoves-assignment
- Repository: https://github.com/sh3llendra/qoves-assignment

## Overview

QOVES is a GitOps-managed Kubernetes platform whose principal workflow is Git push → ArgoCD reconciliation → deployed API and PostgreSQL, with monitoring and network controls. The README documents the app-of-apps structure and sync-wave ordering; the sampled API source confirms its health-check and metrics behavior. Several manifest internals were not sampled, so their links are limited to relationships documented in the README.

Main entry points: [`applications`](https://github.com/sh3llendra/qoves-assignment/tree/main/applications) (Child Applications), [`applications/monitoring.yml`](https://github.com/sh3llendra/qoves-assignment/blob/main/applications/monitoring.yml) (Prometheus stack), [`manifests/api`](https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api) (API Deployment), [`app/main.py`](https://github.com/sh3llendra/qoves-assignment/blob/main/app/main.py) (Flask API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_gitops["GitOps delivery"]
  node_argocd["ArgoCD"]
  node_root_app["Root Application"]
  node_child_apps["Child Applications"]
end

subgraph group_workloads["API and data"]
  node_api["Flask API<br/>[main.py]"]
  node_api_deploy["API Deployment"]
  node_api_service["API Service"]
  node_ingress["Ingress"]
  node_hpa["API HPA"]
  node_postgres[("PostgreSQL")]
end

subgraph group_security["Secrets and network"]
  node_sealed_secret["Database SealedSecret"]
  node_sealed_controller["Sealed Secrets controller<br/>[secrets.yml]"]
  node_network_policies["NetworkPolicies"]
end

subgraph group_observability["Monitoring"]
  node_prometheus["Prometheus stack<br/>[monitoring.yml]"]
  node_service_monitor["ServiceMonitor"]
  node_prom_rule["PrometheusRule"]
  node_metrics["API metrics endpoint<br/>[main.py]"]
end

node_github(("GitHub"))
node_cluster["minikube cluster"]

node_github -->|"triggers sync"| node_argocd
node_argocd -->|"reconciles"| node_root_app
node_root_app -->|"manages app-of-apps"| node_child_apps
node_child_apps -->|"syncs resources"| node_cluster
node_api_deploy -->|"runs"| node_api
node_api_service -->|"exposes"| node_api_deploy
node_ingress -->|"routes to"| node_api_service
node_hpa -->|"scales"| node_api_deploy
node_api -->|"checks connection"| node_postgres
node_sealed_controller -.->|"unseals"| node_sealed_secret
node_child_apps -->|"syncs wave 0"| node_sealed_controller
node_child_apps -->|"syncs wave 1"| node_postgres
node_child_apps -->|"syncs wave 1"| node_network_policies
node_child_apps -->|"syncs wave 2"| node_api_deploy
node_child_apps -->|"syncs wave 2"| node_prometheus
node_child_apps -->|"syncs wave 3"| node_service_monitor
node_child_apps -->|"syncs wave 3"| node_prom_rule
node_prometheus -->|"scrapes targets"| node_service_monitor
node_prometheus -->|"evaluates rules"| node_prom_rule
node_service_monitor -.->|"selects target"| node_api_service
node_metrics -.->|"exposes metrics"| node_prometheus
node_api -->|"serves"| node_metrics

click node_root_app "https://github.com/sh3llendra/qoves-assignment/blob/main/bootstrap/root-application.yaml"
click node_child_apps "https://github.com/sh3llendra/qoves-assignment/tree/main/applications"
click node_api "https://github.com/sh3llendra/qoves-assignment/blob/main/app/main.py"
click node_api_deploy "https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api"
click node_api_service "https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api"
click node_ingress "https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api"
click node_hpa "https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api"
click node_postgres "https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/data"
click node_sealed_secret "https://github.com/sh3llendra/qoves-assignment/blob/main/manifests/data/qoves-db-sealed.yaml"
click node_sealed_controller "https://github.com/sh3llendra/qoves-assignment/blob/main/applications/secrets.yml"
click node_network_policies "https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/network"
click node_prometheus "https://github.com/sh3llendra/qoves-assignment/blob/main/applications/monitoring.yml"
click node_service_monitor "https://github.com/sh3llendra/qoves-assignment/blob/main/manifests/monitoring/servicemonitor.yaml"
click node_prom_rule "https://github.com/sh3llendra/qoves-assignment/blob/main/manifests/monitoring/prometheusrule.yaml"
click node_metrics "https://github.com/sh3llendra/qoves-assignment/blob/main/app/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_argocd,node_root_app,node_child_apps toneBlue
class node_api,node_api_deploy,node_api_service,node_ingress,node_hpa,node_postgres toneAmber
class node_sealed_secret,node_sealed_controller,node_network_policies toneMint
class node_prometheus,node_service_monitor,node_prom_rule,node_metrics toneRose
class node_github,node_cluster toneIndigo
```

## Components

### GitOps delivery

- **ArgoCD**
- [Root Application](https://github.com/sh3llendra/qoves-assignment/blob/main/bootstrap/root-application.yaml): `bootstrap/root-application.yaml`
- [Child Applications](https://github.com/sh3llendra/qoves-assignment/tree/main/applications): `applications`

### API and data

- [Flask API](https://github.com/sh3llendra/qoves-assignment/blob/main/app/main.py): `app/main.py`
- [API Deployment](https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api): `manifests/api`
- [API Service](https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api): `manifests/api`
- [Ingress](https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api): `manifests/api`
- [API HPA](https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/api): `manifests/api`
- [PostgreSQL](https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/data): `manifests/data`

### Secrets and network

- [Database SealedSecret](https://github.com/sh3llendra/qoves-assignment/blob/main/manifests/data/qoves-db-sealed.yaml): `manifests/data/qoves-db-sealed.yaml`
- [Sealed Secrets controller](https://github.com/sh3llendra/qoves-assignment/blob/main/applications/secrets.yml): `applications/secrets.yml`
- [NetworkPolicies](https://github.com/sh3llendra/qoves-assignment/tree/main/manifests/network): `manifests/network`

### Monitoring

- [Prometheus stack](https://github.com/sh3llendra/qoves-assignment/blob/main/applications/monitoring.yml): `applications/monitoring.yml`
- [ServiceMonitor](https://github.com/sh3llendra/qoves-assignment/blob/main/manifests/monitoring/servicemonitor.yaml): `manifests/monitoring/servicemonitor.yaml`
- [PrometheusRule](https://github.com/sh3llendra/qoves-assignment/blob/main/manifests/monitoring/prometheusrule.yaml): `manifests/monitoring/prometheusrule.yaml`
- [API metrics endpoint](https://github.com/sh3llendra/qoves-assignment/blob/main/app/main.py): `app/main.py`

### Other components

- **GitHub**
- **minikube cluster**

## Connections

- GitHub → ArgoCD: triggers sync (evidence: `README.md`)
- ArgoCD → Root Application: reconciles (evidence: `README.md`)
- Root Application → Child Applications: manages app-of-apps (evidence: `README.md`)
- Child Applications → minikube cluster: syncs resources (evidence: `README.md`)
- API Deployment → Flask API: runs (evidence: `README.md`)
- API Service → API Deployment: exposes (evidence: `README.md`)
- Ingress → API Service: routes to (evidence: `README.md`)
- API HPA → API Deployment: scales (evidence: `README.md`)
- Flask API → PostgreSQL: checks connection (evidence: `app/main.py`)
- Sealed Secrets controller → Database SealedSecret: unseals
- Child Applications → Sealed Secrets controller: syncs wave 0 (evidence: `README.md`)
- Child Applications → PostgreSQL: syncs wave 1 (evidence: `README.md`)
- Child Applications → NetworkPolicies: syncs wave 1 (evidence: `README.md`)
- Child Applications → API Deployment: syncs wave 2 (evidence: `README.md`)
- Child Applications → Prometheus stack: syncs wave 2 (evidence: `README.md`)
- Child Applications → ServiceMonitor: syncs wave 3 (evidence: `README.md`)
- Child Applications → PrometheusRule: syncs wave 3 (evidence: `README.md`)
- Prometheus stack → ServiceMonitor: scrapes targets (evidence: `README.md`)
- Prometheus stack → PrometheusRule: evaluates rules (evidence: `README.md`)
- ServiceMonitor → API Service: selects target
- API metrics endpoint → Prometheus stack: exposes metrics
- Flask API → API metrics endpoint: serves (evidence: `app/main.py`)
