How rancher/fleet works
Main Components (Core Architecture)
a. Control Plane Components:
• Fleet Controller (in /cmd/fleetcontroller)
• Git Operations Controller (in /internal/cmd/controller/gitops)
• Helm Operations Controller (in /internal/cmd/controller/helmops)
• Image Scanner Controller (in /internal/cmd/controller/imagescan)
b. Agent Components:
• Fleet Agent (in /cmd/fleetagent)
• Bundle Deployment Controller
• Drift Detection System
Specific Elements
a. Source Management:
• Git repositories
• Helm charts
• Raw Kubernetes manifests
• Kustomize configurations
b. Processing Pipeline:
• Bundle creation
• Resource transformation
• Helm chart generation
• Deployment management
c. Cluster Management:
• Multi-cluster registration
• Agent communication
• Status reporting
• Drift detection
Component Relationships
[Git Sources] → [Fleet Controller] → [Bundle Processing] → [Fleet Agents] → [Target Clusters]
• ↑ ↓ ↓ ↓
[Helm Charts] [Image Scanner] [Helm Operations] [Drift Detection]
• ↑ ↓ ↓ ↓
[Kustomize] [Status Tracking] → [Resource Manager] → [Deployment Status]
Important Subsystems to Detail
a. GitOps Pipeline:
• Repository watching
• Change detection
• Bundle generation
• Deployment orchestration
b. Cluster Management:
• Registration system
• Agent communication
• Health monitoring
• Configuration management
c. Security Layer:
• Authentication
• Authorization
• Secret management
• Secure communication
Operational Flows
Following key processes:
Status collection and reporting
• Handle multiple clusters at scale
• Support various deployment sources
• Maintain consistency across clusters
• Provide visibility and control
• Enable GitOps workflows
• Component types
• State indicators
• Relationship types
This system design should capture Fleet's sophisticated architecture while making it clear how it achieves GitOps at scale across multiple clusters.