How cloudforet-io/supervisor works
Project type and purpose
• This is a standalone Python-based “Supervisor Service” whose purpose is to dynamically deploy and manage plugin collectors (e.g., aws-ec2, google-oauth2) either as Docker containers or Kubernetes pods. It exposes a gRPC interface so that an external inventory service can request plugin endpoints, and Supervisor will deploy the plugin on demand if it’s not already running.
File structure
• Top-level:
• Dockerfile, .dockerignore, skaffold.template.yaml, deploy/helm/… → container/K8s deployment artifacts
• src/spaceone/supervisor/… → Python application code, organized in subpackages:
– interface/grpc → gRPC server definitions
– service → high-level RPC service implementations
– manager → orchestrator logic that decides what to deploy and when
– scheduler → scheduling logic for sync and health checks
– connector → low-level drivers (Docker API, Kubernetes API, plugin repository, generic container connector)
– conf → global and scheduler configuration
– error, info → structured error and telemetry data
• pkg/pip_requirements.txt & setup.py → Python packaging
• .github/workflows → CI/CD pipelines, automated chart builds and releases
README for additional insights
• Describes two operating modes (Docker vs. K8s) and that the service is deployed standalone.
Elements
• Blue for internal application layers (Interface, Service, Manager, Scheduler)
• Green for connectors
• Orange for external systems (Docker, K8s)
• Gray for configuration
[Client] → [gRPC Interface] → [SupervisorService] → [PluginServiceManager] → [SyncScheduler] → {DockerConnector → Docker Daemon | K8sConnector → K8s API} → [Plugin Runtime]