No description
  • Go 86.2%
  • Shell 10%
  • Makefile 1.9%
  • Go Template 1.1%
  • Dockerfile 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Martin Wunderwald 18b9144c99
All checks were successful
mirror-to-gitlab / mirror (push) Successful in 2s
ci-main / test (push) Successful in 5m4s
fix(scheduler): bound prediction plugin cache sync with a timeout
predictionfilter/predictionscore called cache.WaitForCacheSync with a never-closed stopCh, so a missing ClusterPredictionState CRD, RBAC denial, or unreachable Karmada API blocked scheduler startup forever. Mirror the carbon plugin's 10s timeout context so init fails fast instead of hanging.
2026-08-18 13:00:53 +02:00
.forgejo/workflows chore(deps): update dependency helm to v4.2.4 2026-08-17 03:11:01 +00:00
chart security: pin image tag and complete securityContext (PSA remediation) 2026-08-11 19:15:23 +02:00
cmd/scheduler fix: align scheduler plugin imports with module path 2026-08-18 08:11:24 +02:00
deploy/argocd docs+feat: capacity-headroom prediction schema, ArgoCD app, showcase 2026-08-07 14:37:03 +02:00
docs docs+feat: capacity-headroom prediction schema, ArgoCD app, showcase 2026-08-07 14:37:03 +02:00
pkg fix(scheduler): bound prediction plugin cache sync with a timeout 2026-08-18 13:00:53 +02:00
test/showcase docs+feat: capacity-headroom prediction schema, ArgoCD app, showcase 2026-08-07 14:37:03 +02:00
.gitignore docs+feat: capacity-headroom prediction schema, ArgoCD app, showcase 2026-08-07 14:37:03 +02:00
.goreleaser.yaml ci: add goreleaser release + helm chart + push validation workflows 2026-05-20 12:22:06 +02:00
CHANGELOG.md docs+feat: capacity-headroom prediction schema, ArgoCD app, showcase 2026-08-07 14:37:03 +02:00
CITATION.cff docs: add open-source publication compliance files 2026-08-07 10:05:25 +02:00
CODE_OF_CONDUCT.md align: rename API groups carbon/prediction.edge-portal.eu -> edge-connect.eu; set contact/security emails to edge-connect.eu 2026-08-07 10:09:36 +02:00
CODEOWNERS docs: add open-source publication compliance files 2026-08-07 10:05:25 +02:00
CONTRIBUTING.md align: rename API groups carbon/prediction.edge-portal.eu -> edge-connect.eu; set contact/security emails to edge-connect.eu 2026-08-07 10:09:36 +02:00
Dockerfile chore(deps): update golang docker tag to v1.26.6 2026-08-17 03:11:03 +00:00
Dockerfile.goreleaser ci: add goreleaser release + helm chart + push validation workflows 2026-05-20 12:22:06 +02:00
Dockerfile.local docs+feat: capacity-headroom prediction schema, ArgoCD app, showcase 2026-08-07 14:37:03 +02:00
EU-DISCLAIMER.md docs: add open-source publication compliance files 2026-08-07 10:05:25 +02:00
go.mod fix(security): bump go directive to 1.26.6 to remediate stdlib CVEs 2026-08-18 10:01:43 +02:00
go.sum fix(deps): update kubernetes & kcp 2026-08-13 03:12:13 +00:00
LICENSE-CODE docs: add open-source publication compliance files 2026-08-07 10:05:25 +02:00
LICENSE-DOCS docs: add open-source publication compliance files 2026-08-07 10:05:25 +02:00
Makefile feat: initial scaffold - combined karmada scheduler with carbon + prediction plugins 2026-05-15 20:31:16 +02:00
NOTICE docs: add open-source publication compliance files 2026-08-07 10:05:25 +02:00
PSA-REMEDIATION.md security: pin image tag and complete securityContext (PSA remediation) 2026-08-11 19:15:23 +02:00
README.md refactor: move module path to edp.buildth.ing/DevFW-CICD/karmada-scheduler-edge-connect 2026-08-13 09:47:15 +02:00
renovate.json refactor: rename API domain edge-connect.eu to edge-portal.eu 2026-06-10 10:23:07 +02:00
SECURITY.md align: rename API groups carbon/prediction.edge-portal.eu -> edge-connect.eu; set contact/security emails to edge-connect.eu 2026-08-07 10:09:36 +02:00
THIRD-PARTY-NOTICES.md docs: add open-source publication compliance files 2026-08-07 10:05:25 +02: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 module is self-contained: the carbon (pkg/apis/carbon) and prediction (pkg/apis/prediction) API types are vendored in-tree, so no replace directives or sibling checkouts are required.

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

Publication note

This repository is published as a result of the EU-funded project DTAG Beitrag zur Entwicklung eines Multi-Provider Edge-Cloud-Kontinuums (Deutsche Telekom IPCEI-CIS), part of the 8ra initiative. It is provided for publication and dissemination purposes and is effectively read-only: external contributions, pull requests, and issue-based collaboration are not accepted unless explicitly requested by the project consortium. See CONTRIBUTING.md and SECURITY.md.

License

Unless stated otherwise:

  • Source code is licensed under the Apache License 2.0 — see LICENSE-CODE.
  • Documentation and other textual materials are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0) — see LICENSE-DOCS.

Attribution and consortium information are recorded in NOTICE. Third-party components are documented in THIRD-PARTY-NOTICES.md.

EU funding notice and disclaimer

Funded by the European Union NextGenerationEU under Grant Agreement No. 13IPC005.

The views and opinions expressed are solely those of the author(s) and do not necessarily reflect the views of the European Union or the European Commission. Neither the European Union nor the European Commission can be held responsible for them.

See EU-DISCLAIMER.md.