Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dynamic-scoring-framework/Dockerfile
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
Expand All @@ -22,7 +22,7 @@ COPY pkg/common/ pkg/common/
# 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 manager cmd/main.go
RUN CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -a -o manager cmd/main.go

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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
Expand Down
6 changes: 3 additions & 3 deletions dynamic-scoring-framework/Dockerfile.addon
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
Expand All @@ -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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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
Expand Down
4 changes: 2 additions & 2 deletions dynamic-scoring-framework/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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} .

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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.
Expand Down
29 changes: 26 additions & 3 deletions dynamic-scoring-framework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ kind: ConfigMap
metadata:
name: skupper-site
data:
name: hub01
name: hub
ingress: nodeport
ingress-host: ${HUB_NODE_IP}
Loading
Loading