Infrastructure-as-Code repository - no application code. Uses Terraform for GCP provisioning and Helm for Kubernetes deployments.
Run these commands in order to verify your changes:
# 1. Validate Terraform formatting
cd terraform && terraform fmt -check -recursive
# 2. Validate Terraform configuration (requires backend setup)
cd terraform && terraform init -backend-config=envs/gke/dev.tfbackend && terraform validate
# 3. Validate Helm charts with dry-run
make install-all DRY_RUN=true
# 4. Check Makefile targets are valid
make helpMakefile- All automation targets. Runmake helpto see available commandsterraform/- GCP infrastructure (GKE, Pub/Sub, VPC)helm/- Kubernetes deployment charts for HyperFleet componentsscripts/tf-helm-values.sh- Generates Helm values from Terraform or environment variablesgenerated-values-from-terraform/- Auto-generated (gitignored), never edit manually
# Terraform: dry-run infrastructure changes
cd terraform
terraform init -backend-config=envs/gke/dev.tfbackend
terraform plan -var-file=envs/gke/dev.tfvars
# Helm: dry-run deployments
make install-all DRY_RUN=true
make install-api DRY_RUN=true NAMESPACE=testAll Makefile targets accept variable overrides:
# Override namespace
make install-all NAMESPACE=my-dev
# Override broker type
make install-all BROKER_TYPE=rabbitmq
# Override image registry and tags
make install-api REGISTRY=quay.io/myuser API_IMAGE_TAG=dev-abc123
# Combine multiple overrides
make install-all NAMESPACE=staging REGISTRY=quay.io/myuser API_IMAGE_TAG=v0.2.0Key Variables:
NAMESPACE(default:hyperfleet) - Kubernetes namespaceBROKER_TYPE(default:googlepubsub) - Message broker:googlepubsuborrabbitmqREGISTRY(default:quay.io/openshift-hyperfleet) - Container registryAPI_IMAGE_TAG,SENTINEL_IMAGE_TAG,ADAPTER_IMAGE_TAG(default:v0.1.1) - Component versionsTF_ENV(default:dev) - Terraform environment name
Path 1: Google Cloud Platform (default)
- Uses Terraform to provision GKE cluster and Pub/Sub
- Requires
gcloudCLI and GCP authentication - Targets:
make install-all
Path 2: RabbitMQ (any Kubernetes)
- No Terraform required, deploys to existing cluster
- Includes dev RabbitMQ manifest
- Targets:
make install-all-rabbitmq
- Use
terraform fmtbefore committing - Module outputs must be documented in
outputs.tf - All variables require descriptions in
variables.tf - Backend config files (
.tfbackend) are gitignored - only commit.examplefiles
- Chart sources live in component repos (
hyperfleet-api,hyperfleet-sentinel,hyperfleet-adapter) - This repo only contains local charts in
helm/directory - Use helm-git plugin to reference external charts (see
CHART_ORGand*_CHART_REFvariables)
- Each target should have a
## Descriptioncomment formake helpoutput - Use
.PHONYfor all non-file targets - Prefix prerequisite checks with
check-* - Group related targets with comment headers
- All scripts must be executable:
chmod +x scripts/*.sh - Use
#!/usr/bin/env bashshebang - Fail fast: add
set -euo pipefailat the top - Document script arguments with usage function
- Do not modify generated files in
generated-values-from-terraform/- they are created byscripts/tf-helm-values.sh - Do not commit
.tfvarsor.tfbackendfiles - only commit.exampleversions - Do not commit kubeconfig or GCP credentials
- Do not create Helm releases without checking namespace - use
make check-namespacefirst - Do not assume kubectl context - always verify with
kubectl config current-context - Do not hardcode GCP project IDs - use
GCP_PROJECT_IDvariable - Do not skip dry-run validation before infrastructure changes
- Do not add dependencies to Makefile without updating
check-*targets
Terraform → GKE Cluster + Pub/Sub
↓
tf-helm-values.sh → generates broker config
↓
Helm Charts → deploy to Kubernetes
├── API
├── Sentinels (clusters, nodepools)
├── Adapters (1, 2, 3)
└── Maestro (server + agent)
- Update
make helpoutput if adding new targets - Add prerequisite checks for new external dependencies
- Keep variable defaults at the top of the file
- Test new targets with
DRY_RUN=truefirst
- Run
terraform fmtbefore committing - Update
terraform/README.mdif changing module behavior - Ensure outputs are documented if used by Helm values script
- Test with
terraform planbefore committing
- Validate with
helm templateormake install-* DRY_RUN=true - Update chart version if changing templates
- Document new values in chart's
values.yaml
# 1. Format Terraform
cd terraform && terraform fmt -recursive
# 2. Validate Terraform (if you have backend access)
cd terraform && terraform init -backend-config=envs/gke/dev.tfbackend && terraform validate
# 3. Validate Helm deployments
make install-all DRY_RUN=true
# 4. Check Makefile help output
make help
# 5. Verify no sensitive files staged
git status | grep -E '\.tfvars$|\.tfbackend$|kubeconfig' && echo "ERROR: sensitive files staged" || echo "OK"See architecture repository for:
- System design and component interactions
- API specifications and async contracts
- Standards and conventions
- hyperfleet-api - REST API + OpenAPI spec
- hyperfleet-sentinel - Event monitoring service
- hyperfleet-adapter - Adapter framework