Dynamic Scoring Framework is a framework for automating resource scoring in multi-cluster environments using Prometheus metrics.
It calculates dynamic scores for each cluster and provides foundational information for resource optimization and automated control.
Repository: https://github.com/open-cluster-management-io/dynamic-scoring-framework
Note: The Git repository is named
dynamic-scoring-framework, but the Go module path isopen-cluster-management.io/dynamic-scoring. Import the module by module path, not by repository name.
git clone https://github.com/open-cluster-management-io/dynamic-scoring-framework.git
cd dynamic-scoring-framework- Multi-cluster support: Automates scoring across multiple clusters using OCM (Open Cluster Management)
- Flexible Scoring API integration: Register and use any scoring API
- Prometheus integration: Collects metrics from each cluster's Prometheus for scoring
- Extensible: CRD-based configuration and management, supports external APIs and authentication
-
DynamicScorer
Registers scoring API information as a CRD -
DynamicScoringConfig
Aggregates registered DynamicScorers and distributes them as ConfigMaps to each cluster -
DynamicScoringAgent
Watches ConfigMaps in each cluster, fetches metrics from Prometheus, calls the scoring API, and exports results as metrics
For more details, refer to the design document.
Please refer to the quick start guide for instructions on deploying the Dynamic Scoring Framework in your environment.
Example Scoring API implementations are available in the samples directory.
Refer to the Scoring API Samples for an overview of all available scorers.
Each sample has its own README with details on the directory structure, endpoints, and how to run it locally with podman:
| Scorer | README | Description |
|---|---|---|
| Sample Scorer | samples/sample-scorer | Basic CPU-based scoring (time series input) |
| LLM Forecast Scorer | samples/llm-forecast-scorer | LLM-powered time series forecasting |
| Simple Prediction Scorer | samples/simple-prediction-scorer | CPU usage prediction with Darts linear regression |
| Static Scorer | samples/static-scorer | Pre-defined performance/power scores (no input required) |
| AI Workload Scorer | samples/ai-workload-scorer | GPU power and performance scoring for AI workloads |
| Policy Watcher | samples/policy-watcher | OCM Policy compliance watcher for ClusterClaim updates |
| DSF MCP Server | samples/dynamic-scoring-framework-mcp | Operation API server with MCP integration for AI-assisted optimization |
Refer to the Optimization Using DSF documentation for examples of how to use the scores generated by the Dynamic Scoring Framework for workload placement optimization in multi-cluster environments.
Please refer to the development guide for instructions on setting up your local development environment.
Run verification checks before submitting changes:
make verify
make test-unit
make test-chartSee CONTRIBUTING.md for contribution guidelines.
api/: API definitions for CRDsinternal/controller/: Controllers for managing CRDs (DynamicScorer, DynamicScoringConfig)config/: Configuration files for deploying the operatordocs/: Documentation filespkg/: Package source code. It contains the common and addon agents implementation.pkg/common/: Common utilities and types used across the project.pkg/dynamic_scoring/: Implementation of the DynamicScoring addon controller in hub cluster.pkg/dynamic_scoring_agent/: Implementation of the DynamicScoringAgent that runs in managed clusters.
samples/: Sample CRDs and Scoring APIs for testing and demonstration