Audience: Developers building and testing Sentinel locally.
- Go 1.25+
- Docker or Podman
- Make
- pre-commit
git clone https://github.com/openshift-hyperfleet/hyperfleet-sentinel.git
cd hyperfleet-sentinel
make generate # generate OpenAPI client (required before build/test)
make download # fetch Go dependencies
make build # build bin/sentinel
make test # run unit tests
make install-hooks # install pre-commit hooksThe OpenAPI client in
pkg/api/openapi/is not committed to git —make generatemust run before any build or test. See openapi/README.md for spec version upgrades and generator details.
| Target | Description |
|---|---|
make generate |
Generate OpenAPI client from spec (Docker/Podman) |
make build |
Build bin/sentinel binary |
make test |
Unit tests with coverage |
make test-unit |
Unit tests only (specific packages) |
make test-integration |
Integration tests with testcontainers (Docker required) |
make test-all |
Unit + integration + Helm tests + lint |
make test-helm |
Helm chart lint + template validation |
make fmt |
Format Go code |
make lint |
Run golangci-lint |
make verify |
go vet + format check (fast) |
make clean |
Remove build artifacts and generated code |
make image |
Build container image |
make help |
Show all available targets |
Quick feedback loop: make verify && make test-unit
- Unit tests: Fast, isolated, use mock implementations. Run with
make test. - Integration tests: End-to-end with real RabbitMQ/Pub/Sub via testcontainers. Run with
make test-integration. See testcontainers.md for Docker/Podman setup and troubleshooting. - Helm tests: Chart linting and template validation across 10 scenarios. Run with
make test-helm.
-
Start a message broker:
# RabbitMQ (recommended for local dev) podman run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management -
Configure broker credentials:
export BROKER_RABBITMQ_URL="amqp://guest:guest@localhost:5672/" export HYPERFLEET_BROKER_TOPIC=hyperfleet-dev-${USER}-clusters
-
Run Sentinel:
./bin/sentinel serve --config=configs/dev-example.yaml
-
Verify:
curl http://localhost:8080/healthz # liveness curl http://localhost:8080/readyz # readiness (503 until first poll) curl http://localhost:9090/metrics | grep hyperfleet_sentinel
For Pub/Sub emulator setup, broker.yaml configuration, and detailed logging options, see the broker library documentation.
To simulate HyperFleet API responses, use the mock HyperFleet API.
# Build for local architecture
make image
# Build for AMD64 (required for GKE)
podman build --platform linux/amd64 -t <registry>/sentinel:<tag> .