How koushik-1230/devsecops-stack works
devsecops-stack is a Kubernetes metrics collection and retrieval stack. Its agent periodically gathers node metrics from the Kubernetes metrics API and Prometheus, then posts them to a FastAPI backend. The backend authenticates the agent, records incoming metrics in an in-memory list, and serves organization-scoped metric queries to authenticated users. Login issues user tokens. Helm chart templates indicate a deployment/configuration subsystem, but their contents were not sampled, so its runtime wiring is not asserted.
Main entry points: main.py FastAPI endpoints · agent.py Metric assembly · devsecops-stack Helm chart
Components 17
Metric collection
- Agent loop
agent/agent.py - Node metrics
agent/agent.py - Prometheus metrics
agent/agent.py - Metric assembly
agent/agent.py - Metric sender
agent/agent.py
Metrics API
- FastAPI endpoints
backend/main.py - Login
backend/main.py - Token creation
backend/main.py - Agent verification
backend/main.py - Metric ingestion
backend/main.py - Metrics list
backend/main.py - User verification
backend/main.py - Metrics queries
backend/main.py
Kubernetes deployment
- Helm chart
helm/devsecops-stack
Other components
- Kubernetes metrics API
- Prometheus
- User
Connections 19
- Agent loop → Metric sender: calls
agent/agent.py - Metric sender → Metric assembly: calls
agent/agent.py - Metric assembly → Node metrics: calls
agent/agent.py - Metric assembly → Prometheus metrics: calls
agent/agent.py - Node metrics → Kubernetes metrics API: queries
agent/agent.py - Prometheus metrics → Prometheus: queries
agent/agent.py - Metric sender → FastAPI endpoints: posts metrics
agent/agent.py - User → Login: submits credentials
- Login → Token creation: creates token
backend/main.py - User → Metrics queries: requests metrics
- FastAPI endpoints → Login: routes login
backend/main.py - FastAPI endpoints → Metric ingestion: routes ingest
backend/main.py - FastAPI endpoints → Metrics queries: routes queries
backend/main.py - Metric ingestion → Agent verification: verifies agent
backend/main.py - Metric ingestion → Metrics list: appends records
backend/main.py - Metrics queries → User verification: requires user
backend/main.py - Metrics queries → Metrics list: filters records
backend/main.py - Helm chart → Agent loop: may deploy
- Helm chart → FastAPI endpoints: may configure