Kubernetes scheduler for GPU/AI workloads, built on kube-batch with a plugin architecture. Go module github.com/kai-scheduler/KAI-scheduler. Services live in cmd/ and pkg/; ls cmd pkg is the map.
- Never hand-edit generated files:
zz_generated*,deployments/kai-scheduler/crds/,deployments/kai-scheduler/templates/rbac/,*_mock.go. Change the source (types, kubebuilder markers, interfaces) and regenerate:make manifests generate-mocks. - New mocks must be added to the explicit
generate-mockslist in theMakefile. make validaterunsmanifests,gen-license,generate-mocksandlint, thengit diff --exit-code. Commit all regenerated output or CI fails. Run it before finishing any non-trivial change.- Sign off every commit (
git commit -s); the DCO check fails otherwise. - Use
git mvwhen moving files. - New files need the Apache-2.0 + NVIDIA header.
make gen-licenseadds it. deployments/kai-scheduler/Chart.lockis untracked local build output (thegpu-fractioningsub-chart is a version range). A stale local one freezes the sub-chart version;rm -fit to pick up a newer release.
API types, generated clients, and the constants, utilities/resources and utilities/podgroup packages live in the standalone module github.com/kai-scheduler/api (version in go.mod); all Go code here imports them from there.
- Do not change API types, CRD fields or API constants only in this repo. Ask first how the change should land in the
apimodule and here; the two must not diverge. Process: CONTRIBUTING.md. - A field change in a served version is an API change and needs a changelog fragment. CRDs are upgraded through
pkg/helmhooks(apply_crds.go); check that path still works.
Read the file for your task before starting; load only what you need.
| If you are... | Read |
|---|---|
| Writing or testing Go code (style, commands, logging) | CONTRIBUTING.md |
| Opening or triaging an issue | ISSUES.md |
| Opening a PR, adding a changelog fragment | PR.md |
Editing pkg/scheduler (plugins, actions, hot path) |
pkg/scheduler/README.md |
Editing test/ or writing e2e tests |
test/README.md |
Editing pkg/operator |
docs/developer/operator.md |
| Adding a workload type to the podgrouper | docs/developer/pod-grouper.md |
| Needing architecture or plugin/action concepts | docs/developer/ |
| Looking for a major feature's design | docs/developer/designs/ (one directory per feature) |
| Needing usage examples | examples/ |
| Diagnosing a Pending pod or PodGroup | .agents/skills/kai-pending |
| Capturing and replaying scheduler snapshots | .agents/skills/snapshots |