How litmuschaos/litmus works
LitmusChaos is a chaos-engineering platform; this repository slice shows its Chaos Center control plane and supporting services. The main user flow is to authenticate, configure a target and experiment workflow, run or schedule it, and view run status. The README documents execution through Kubernetes chaos resources, while the sampled subscriber code shows Kubernetes event watching and workflow-event streaming. Some subsystems are represented by tree paths or README capabilities rather than inspected implementation, so their internal wiring is intentionally limited.
Main entry points: server.go GraphQL API · operations.go MongoDB persistence · App.tsx Web application · application_service.go Identity services
Components 24
Chaos Center UI
- Web application
chaoscenter/web/src/app/App.tsx - Workflow editor
chaoscenter/web/src/components/PipelineDiagram/PipelineGraph/PipelineGraph.tsx - Web API hooks
chaoscenter/web/src/api/core/experiments/runChaosExperiment.ts
Control Plane
- GraphQL API
chaoscenter/graphql/server/server.go - Experiment service
chaoscenter/graphql/server/pkg/chaos_experiment/ops/service.go - Run service
chaoscenter/graphql/server/pkg/chaos_experiment_run/service.go - Infrastructure service
chaoscenter/graphql/server/pkg/chaos_infrastructure/service.go - Chaos Hub service
chaoscenter/graphql/server/pkg/chaoshub/service.go - GitOps service
chaoscenter/graphql/server/pkg/gitops/service.go - Probe service
chaoscenter/graphql/server/pkg/probe/handler/handler.go - Environment handler
chaoscenter/graphql/server/pkg/environment/handler/handler.go - MongoDB persistence
chaoscenter/graphql/server/pkg/database/mongodb/operations.go - Control-plane upgrades
chaoscenter/upgrade-agents/control-plane/versions/upgrade-manager.go
Identity
- Authentication API
chaoscenter/authentication/api/main.go - Identity services
chaoscenter/authentication/pkg/services/application_service.go - Session service
chaoscenter/authentication/pkg/services/session_service.go - Identity repositories
chaoscenter/authentication/pkg/user/repository.go
Execution Tracking
- Kubernetes subscriber
chaoscenter/subscriber/subscriber.go - Engine event watcher
chaoscenter/subscriber/pkg/events/chaosengine.go - Workflow events
chaoscenter/subscriber/pkg/events/workflow.go - Event tracker controller
chaoscenter/event-tracker/controllers/eventtrackerpolicy_controller.go
Other components
- Developer / SRE
- Target Kubernetes
- Chaos execution plane
Connections 32
- Developer / SRE → Web application: uses
- Web application → Workflow editor: edits workflow
- Web application → Web API hooks: requests data
- Web API hooks → GraphQL API: calls API
- GraphQL API → Experiment service: dispatches
- GraphQL API → Run service: dispatches
- GraphQL API → Infrastructure service: dispatches
- GraphQL API → Chaos Hub service: dispatches
- GraphQL API → GitOps service: dispatches
- GraphQL API → Probe service: dispatches
- GraphQL API → Environment handler: dispatches
- Experiment service → MongoDB persistence: reads / writes
- Run service → MongoDB persistence: reads / writes
- Infrastructure service → MongoDB persistence: reads / writes
- Chaos Hub service → MongoDB persistence: reads / writes
- GitOps service → MongoDB persistence: reads / writes
- Probe service → MongoDB persistence: reads / writes
- Environment handler → MongoDB persistence: reads / writes
- Developer / SRE → Authentication API: authenticates
- Authentication API → Identity services: invokes
- Identity services → Session service: uses
- Identity services → Identity repositories: reads / writes
- Session service → Identity repositories: stores tokens
- GraphQL API → Authentication API: validates identity
- Kubernetes subscriber → Engine event watcher: starts watcher
- Engine event watcher → Target Kubernetes: watches resources
- Engine event watcher → Workflow events: emits events
- Target Kubernetes → Chaos execution plane: hosts resources
- Chaos execution plane → Target Kubernetes: runs experiments
- Event tracker controller → Target Kubernetes: reconciles policy
- Event tracker controller → Chaos execution plane: triggers experiment
- Control-plane upgrades → MongoDB persistence: updates version