How middleware-labs/mw-agent works
Main Components
a. Agent Types (Primary Components):
• Host Agent (Linux/Windows/Darwin)
• Kubernetes Agent
b. Supporting Infrastructure:
• Configuration Management
• Metadata Processing
• Packaging Systems
• Deployment Mechanisms
┌─ Host Environment ─────────┐ ┌─ Kubernetes Environment ─┐
• ┌─ Host Agent ─────────┐ │ │ ┌─ Kube Agent ────────┐ │
• Linux │ │ │ │ - DaemonSet/Pod │ │
• Windows │ │ │ │ - RBAC │ │
• Darwin │ │ │ │ - ConfigMaps │ │
• ┬─┘ │ │ └──────────┬─────────┘ │
• ┬┘ │ └─────────────┬───────────┘
┌─────────────────────┼─────┼───────────────────┘
• OpenTelemetry │ │
• Configuration ──────┘ │
• ┘
Detailed Component Breakdown
a. Host Agent Section:
• Platform-specific implementations (hostagent_darwin.go, hostagent_linux.go, hostagent_windows.go)
• Service management (systemd, Windows Service)
• Configuration handling
b. Kubernetes Agent Section:
• Kubernetes-specific components (RBAC, ConfigMaps, Secrets)
• Helm chart structure
• Monitoring paths
c. Packaging & Distribution:
• Package formats (DEB, RPM, MSI, PKG)
• Build pipeline connections
• Deployment workflows
Important Relationships
• Configuration flow from various sources (env vars, CLI flags, config files)
• Data collection paths
• Deployment workflows
• Integration points with OpenTelemetry
Technical Details
• Go-based implementation
• OpenTelemetry integration
• Platform-specific monitoring capabilities
• Configuration management
• Package management systems
Specific Implementation Notes
• The separation between host and Kubernetes agents
• Configuration management across platforms
• Package distribution mechanisms
• Monitoring and telemetry flows
• Security considerations (RBAC, certificates)