No description
  • Go 95.8%
  • Makefile 2.1%
  • Smarty 1.2%
  • Dockerfile 0.9%
Find a file
martin.wunderwald fa0ebb01b5
All checks were successful
ci-main / test (push) Successful in 4m21s
Merge pull request 'chore: Configure Renovate' (#1) from renovate/configure into main
Reviewed-on: #1
2026-05-21 07:21:23 +00:00
.forgejo/workflows ci: add goreleaser release + helm chart + push validation workflows 2026-05-20 12:22:06 +02:00
chart chore: update chart image to edp.buildth.ing/devfw-cicd 2026-05-21 09:07:05 +02:00
cmd/scheduler feat: inline plugin code and rename module to orch-karmada-scheduler-edge-connect 2026-05-18 10:13:23 +02:00
docs feat: align RBAC and docs with edge-connect API groups; add full docs tree 2026-05-15 21:43:08 +02:00
pkg ci: add goreleaser release + helm chart + push validation workflows 2026-05-20 12:22:06 +02:00
.gitignore feat: align RBAC and docs with edge-connect API groups; add full docs tree 2026-05-15 21:43:08 +02:00
.goreleaser.yaml ci: add goreleaser release + helm chart + push validation workflows 2026-05-20 12:22:06 +02:00
Dockerfile feat: initial scaffold - combined karmada scheduler with carbon + prediction plugins 2026-05-15 20:31:16 +02:00
Dockerfile.goreleaser ci: add goreleaser release + helm chart + push validation workflows 2026-05-20 12:22:06 +02:00
go.mod fix(deps): bump moby/spdystream, grpc, oauth2 (3 CVEs) 2026-05-20 12:47:54 +02:00
go.sum fix(deps): bump moby/spdystream, grpc, oauth2 (3 CVEs) 2026-05-20 12:47:54 +02:00
Makefile feat: initial scaffold - combined karmada scheduler with carbon + prediction plugins 2026-05-15 20:31:16 +02:00
README.md feat: align RBAC and docs with edge-connect API groups; add full docs tree 2026-05-15 21:43:08 +02:00
renovate.json Add renovate.json 2026-05-21 03:08:14 +00:00
VERSION feat: initial scaffold - combined karmada scheduler with carbon + prediction plugins 2026-05-15 20:31:16 +02:00

Karmada Scheduler Edge Connect

Combined Karmada scheduler that replaces the stock karmada-scheduler with three additional plugins compiled in:

Plugin Type Source What it does
CarbonScore Filter + Score karmada-carbon-scheduler Filters/scores clusters by carbon intensity and renewable energy share via ClusterCarbonMetrics CRD
PredictionFilter Filter karmada-prediction-scheduler Hard-rejects clusters with catastrophic predicted pressure (>95%) or extreme hotspots
PredictionScore Score karmada-prediction-scheduler Ranks clusters by predicted future capacity with optional estimator fusion

All stock Karmada scheduler plugins remain active — these three are additive.

Full documentation lives under docs/. Start with docs/dependencies.md for what each plugin needs to actually do useful work (CRDs, collectors, prediction pipeline), then docs/getting-started/quickstart.md for installation and docs/how-to/enable-plugins-staged.md for the safe rollout sequence.

Why?

Karmada does not support chaining multiple scheduler binaries. A ResourceBinding is handled by exactly one scheduler. Running carbon and prediction as separate schedulers means workloads get one or the other, never both.

This repo compiles all plugins into a single binary that replaces the stock karmada-scheduler deployment so every workload benefits from all scheduling signals.

Architecture

┌─────────────────────────────────────────────────────┐
│              karmada-scheduler-edge-connect          │
│                                                     │
│  ┌─────────────┐  ┌──────────────────┐              │
│  │ Filter phase │  │ Score phase      │              │
│  │              │  │                  │              │
│  │ • built-ins  │  │ • built-ins      │              │
│  │ • CarbonScore│  │ • CarbonScore    │              │
│  │ • Prediction │  │ • PredictionScore│              │
│  │   Filter     │  │                  │              │
│  └──────┬───────┘  └────────┬─────────┘              │
│         │ AND               │ SUM                    │
│         ▼                   ▼                        │
│    candidates          ranked list                   │
└─────────────────────────────────────────────────────┘
         ▲                    ▲
         │                    │
  ClusterCarbonMetrics  ClusterPredictionState
  (carbon-data-collector)  (prediction-service)

Prerequisites

Both CRDs must be installed in the Karmada control plane:

  • ClusterCarbonMetrics (API group carbon.edge-connect.eu)
  • ClusterPredictionState (API group prediction.edge-connect.eu)

The plugins degrade gracefully if their CRDs are absent — they log a warning and allow all clusters through (fail-open).

Development

# Build locally
make build-local

# Run tests
make test

# Build Docker image (run from repo root — Dockerfile uses sibling dirs)
make docker-build

The go.mod uses replace directives pointing to sibling directories:

replace (
    github.com/telekom-8ra/karmada-carbon-scheduler => ../karmada-carbon-scheduler
    karmada-prediction-scheduler => ../karmada-prediction-scheduler
)

Ensure both repos are checked out alongside this one under ../.

Deployment

helm install karmada-scheduler chart/ \
  --namespace karmada-system \
  --set image.repository=<registry>/karmada-scheduler-edge-connect \
  --set image.tag=v0.1.0 \
  --set kubeconfig.existingSecret=karmada-kubeconfig

This deployment replaces the stock karmada-scheduler. Delete or scale down the original deployment first.

Configuration

CarbonScore plugin (env vars)

Variable Default Description
CARBON_WEIGHT 0.7 Weight for carbon intensity in score calculation
RENEWABLE_WEIGHT 0.3 Weight for renewable share in score calculation
MAX_CARBON_INTENSITY 200 Max gCO₂/kWh threshold for filter (0=disabled)
MIN_RENEWABLE_SHARE 0.0 Min renewable % threshold for filter (0=disabled)

PredictionScore plugin (env vars)

Variable Default Description
PREDICTION_SCORE_MODE prediction_only prediction_only or estimator_fusion
PREDICTION_SCORE_WEIGHT 30 Weight for prediction score
PREDICTION_HORIZON 10m Prediction horizon (10m, 30m, 60m)
PREDICTION_ESTIMATOR_TIMEOUT 500ms RPC timeout for estimator calls

Scheduler flags

Flag Default Description
--plugins *,CarbonScore,PredictionFilter,PredictionScore Enable all defaults + custom plugins
--enable-scheduler-estimator true Enable Karmada scheduler estimator
--leader-elect true HA leader election

License

Apache-2.0 — Copyright 2026 Deutsche Telekom AG / IPCEI-CIS