Skip to content

Development

This section covers development setup and contribution guidelines.

Overview

Minecraft Operator is built with:

  • Go 1.25+ — Primary language
  • controller-runtime — Kubernetes operator framework
  • Kubebuilder v4 — Project scaffolding
  • Helm — Deployment charts

Sections

  • Setup


    Development environment setup

    Setup

  • Contributing


    Contribution guidelines and workflow

    Contributing

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/v1alpha1/           # CRD type definitions
├── internal/controller/    # Controller implementations
├── pkg/                    # Shared packages
│   ├── solver/             # Constraint solver
│   ├── plugins/            # Plugin API clients
│   ├── rcon/               # RCON client
│   ├── registry/           # Docker Hub client
│   └── webui/              # Web UI
├── charts/                 # Helm charts
│   ├── minecraft-operator-crds/
│   └── minecraft-operator/
├── cmd/main.go             # Entrypoint
└── Makefile                # Build automation

Key Files

File Purpose
api/v1alpha1/*_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 Fast tests with envtest
E2E make test-e2e Full cluster tests (Kind)
Lint make lint Code quality checks

TDD Workflow

This project follows strict TDD:

  1. Write failing test
  2. Implement minimal code
  3. Run test → pass
  4. Refactor
  5. Repeat

See CLAUDE.md for detailed standards.

See Also