Kubernetes controller for BlanketOps Environments.
- This project wires Kubernetes CRDs to the
blanketops/environmentsengine. - The controller is intentionally thin — all business logic lives in the engine module.
The system is split into two parts:
- Domain logic
- Resolution layer
- Mediators
- Infra adapters
- Secrets management
- Contracts
🎛 Controller (this project)
- Kubernetes reconcilers
- Watches CRDs
- Calls engine mediators
- Updates status
The controller orchestrates reconciliation; business rules live in the engine module.
The controller reconciles:
- Build
- Deployment
- Environment
- Package
- ServiceUnit
- GitRepository
- GitHubEvent
- Route (registered, but errors on every CR — no domain handler is registered for its GVK yet)
- Domain (registered, but Reconcile is a no-op stub)
CRD schemas for these Kinds live in the external environments-api module. All behavior is delegated to the engine layer.
Go v1.26+
Docker
Kubernetes v1.25+
kubectlBuild tooling is mage.
Run locally:
mage runBuild and push image:
IMG=<registry>/environments-controller:<tag> mage dockerbuild dockerpushRun the unit test suite:
mage testThis repo generates config/rbac/role.yaml and syncs it to the separate install repo, which owns cluster deployment manifests (config/manager, config/default, Helm chart).
Releases are tag-driven:
git tag v0.0.X
git push origin --tagsThe pipeline will:
- Generate CHANGELOG.md
- Commit it to main
- Create GitHub Release
- Publish release notes
- Thin controller
- Engine-driven architecture
- Explicit domain contracts
- Resolution-based orchestration
Infrastructure adapters isolated from Kubernetes layer
Apache 2.0