-
Notifications
You must be signed in to change notification settings - Fork 31
🌱 add samples and docs of the Dynamic Scoring Framework #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
2652e6e
6cbf00d
4f05773
9c2dcda
db5daa3
edbe310
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # Build the manager binary | ||
| FROM golang:1.24 AS builder | ||
| ARG TARGETOS | ||
| ARG TARGETARCH | ||
| ARG OS=linux | ||
| ARG ARCH=amd64 | ||
|
|
||
| WORKDIR /workspace | ||
| # Copy the Go Modules manifests | ||
|
|
@@ -21,7 +21,7 @@ COPY pkg/ pkg/ | |
| # was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO | ||
| # the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore, | ||
| # by leaving it empty we can ensure that the container and binary shipped on it will have the same platform. | ||
| RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o dynamic-scoring-addon cmd/main.go | ||
| RUN CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -a -o dynamic-scoring-addon cmd/main.go | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For arm64 image build. |
||
|
|
||
| # Use distroless as minimal base image to package the manager binary | ||
| # Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,11 +179,11 @@ run: manifests generate fmt vet ## Run a controller from your host. | |
|
|
||
| .PHONY: docker-build-controller | ||
| docker-build-controller: ## Build docker image with the manager. | ||
| $(CONTAINER_TOOL) build -t ${IMG_CONTROLLER} . | ||
| $(CONTAINER_TOOL) build $(IMAGE_BUILD_EXTRA_FLAGS) -t ${IMG_CONTROLLER} . | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For arm64 image build. |
||
|
|
||
| .PHONY: docker-build-addon | ||
| docker-build-addon: ## Build docker image with the addon. | ||
| $(CONTAINER_TOOL) build -t ${IMG_ADDON} . -f Dockerfile.addon --no-cache | ||
| $(CONTAINER_TOOL) build $(IMAGE_BUILD_EXTRA_FLAGS) -t ${IMG_ADDON} -f Dockerfile.addon --no-cache . | ||
|
|
||
| .PHONY: docker-push-controller | ||
| docker-push-controller: ## Push docker image with the manager. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,29 @@ For more details, refer to the [design document](docs/concept-and-design.md). | |
|
|
||
| Please refer to the [quick start guide](docs/quickstart.md) for instructions on deploying the Dynamic Scoring Framework in your environment. | ||
|
|
||
| ## Further Reading | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have added guidance to the Scoring API sample collection and included an example of resource allocation optimization using DSF. |
||
|
|
||
| ### Scoring API Samples | ||
|
|
||
| Example Scoring API implementations are available in the [samples](samples/) directory. | ||
| Refer to the [Scoring API Samples](docs/scoring-api-samples.md) 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](samples/sample-scorer/README.md) | Basic CPU-based scoring (time series input) | | ||
| | LLM Forecast Scorer | [samples/llm-forecast-scorer](samples/llm-forecast-scorer/README.md) | LLM-powered time series forecasting | | ||
| | Simple Prediction Scorer | [samples/simple-prediction-scorer](samples/simple-prediction-scorer/README.md) | CPU usage prediction with Darts linear regression | | ||
| | Static Scorer | [samples/static-scorer](samples/static-scorer/README.md) | Pre-defined performance/power scores (no input required) | | ||
| | AI Workload Scorer | [samples/ai-workload-scorer](samples/ai-workload-scorer/README.md) | GPU power and performance scoring for AI workloads | | ||
| | Policy Watcher | [samples/policy-watcher](samples/policy-watcher/README.md) | OCM Policy compliance watcher for ClusterClaim updates | | ||
| | DSF MCP Server | [samples/dynamic-scoring-framework-mcp](samples/dynamic-scoring-framework-mcp/README.md) | Operation API server with MCP integration for AI-assisted optimization | | ||
|
|
||
| ### Optimization Using DSF | ||
|
|
||
| Refer to the [Optimization Using DSF](docs/optimization-using-dsf.md) documentation for examples of how to use the scores generated by the Dynamic Scoring Framework for workload placement optimization in multi-cluster environments. | ||
|
|
||
| --- | ||
|
|
||
| ## Development Environment Setup | ||
|
|
@@ -46,7 +69,7 @@ Please refer to the [development guide](docs/development.md) for instructions on | |
| - `config/`: Configuration files for deploying the operator | ||
| - `docs/`: Documentation files | ||
| - `pkg/`: 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. | ||
| - `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 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For arm64 image build.