Development¶
This section covers development setup and contribution guidelines.
Overview¶
Minecraft Operator is built with:
- Go 1.26+ — Primary language
- controller-runtime — Kubernetes operator framework
- Kubebuilder v4 — Project scaffolding
- Helm — Deployment charts
Sections¶
-
Setup
Development environment setup
-
Contributing
Contribution guidelines and workflow
Quick Start¶
# Clone repository
git clone https://github.com/lexfrei/minecraft-operator.git
cd minecraft-operator
# Install dependencies
make manifests generate
# Run tests
make test
# Run linter
make lint
# Run locally
make run
Project Structure¶
minecraft-operator/
├── api/v1beta1/ # CRD type definitions
├── internal/
│ ├── controller/ # Controller implementations
│ └── crdmanager/crds/ # Embedded CRDs (controller-gen output)
├── pkg/ # Shared packages
│ ├── solver/ # Constraint solver
│ ├── plugins/ # Plugin API clients
│ ├── rcon/ # RCON client
│ ├── registry/ # Docker Hub client
│ ├── testutil/ # Test mocks and helpers
│ └── webui/ # Web UI
├── charts/
│ └── minecraft-operator/ # Helm chart
├── cmd/main.go # Entrypoint
└── Makefile # Build automation
Key Files¶
| File | Purpose |
|---|---|
api/v1beta1/*_types.go | CRD definitions |
internal/controller/*_controller.go | Reconciliation logic |
.architecture.yaml | Technical decisions (ADRs) |
CLAUDE.md | Development standards |
Testing¶
The project uses multiple testing strategies:
| Type | Command | Description |
|---|---|---|
| Unit | make test | Controller and package tests with envtest |
| Helm | helm unittest charts/minecraft-operator | Chart template validation |
| E2E | make test-e2e | Full cluster tests (Kind) |
| Lint | make lint | Code quality checks |
TDD Workflow¶
This project follows strict TDD:
- Write failing test
- Implement minimal code
- Run test → pass
- Refactor
- Repeat
See CLAUDE.md for detailed standards.
See Also¶
- Setup — Development environment
- Contributing — Contribution workflow
- Architecture — System design