How longhorn/longhorn-manager works
Main Components
a. Core Components:
• Longhorn Manager (Control Plane)
• Instance Manager
• CSI Plugin
• UI Component
• Webhook Server
• Recovery Backend
• Metrics Collector
b. External Dependencies:
• Kubernetes API Server
• Storage Backend (iSCSI/NFS)
• Host System Components
Component Relationships
• Control flow between Longhorn Manager and Kubernetes API
• Data flow between storage components
• Communication between controllers and their managed resources
• Integration points with CSI infrastructure
Detailed Component Breakdown
a. Controller Layer:
• Volume Controller
• Node Controller
• Engine Controller
• Replica Controller
• Backup Controller
• System Backup Controller
b. API Layer:
• REST API endpoints
• WebSocket Controller
• Admission Webhooks
• Conversion Webhooks
c. Storage Layer:
• Engine Management
• Replica Management
• Backup Management
• Volume Management
Component Relationships to Highlight
Longhorn Manager
• Control Plane
• Controller Manager
• API Server
• Webhook Server
• Data Plane
• Instance Manager
• Engine Components
• Replica Components
• Monitoring
• Metrics Collector
• Recovery Backend
Implementation Details
• CSI driver integration
• Volume lifecycle management
• Backup and restore flows
• High availability features
• Monitoring and metrics collection
Specific Elements
• The manager's role in orchestrating storage operations
• Integration with Kubernetes storage primitives
• Backup and disaster recovery paths
• Monitoring and metrics collection flows
┌─ Application Layer ─┐
• UI / API / Webhook │
• Control Layer ────┤
• Controllers │
• Storage Layer ───┤
• Engines/Replicas │
• Infrastructure ──┘
Remember to:
• Use consistent styling
• Brief descriptions for complex interactions
• Both control and data paths
• Scalability points
This system design should provide a clear understanding of how Longhorn Manager orchestrates distributed storage in a Kubernetes environment while maintaining high availability and durability of the data.