Leases API operations
The leases API deploys from develop as one release, and its migration Job signs in as service_leases.
Leases deploys as one Helm release, leases-api. The image entrypoint is /service, built from
services/leases/cmd/api/main.go. That process serves HTTP and also runs the
outbox publisher.
services/leases/.azure/azure-pipelines.yml triggers on changes under
services/leases and under common, because the image compiles that shared code. A merge to
develop deploys to dev. A merge to main deploys to prod once secrets.prod.yaml exists.
That file uses the prod Key Vault key and is not in the repo yet.
Replica count, the node pool, and the dev ingress host are in services/leases/.azure/k8s/values/api.dev.yaml.
Lease commands call Billing in-cluster. That URL is in
services/leases/.azure/env/config.dev.yaml. DEV_AUTH is not set. The
process refuses to start when that variable is 1 outside local.
The Service Bus domain lease and its billing subscriber are declared in
services/leases/.azure/bus/topology.yaml. Applying that topology creates
leases-lease-queue-billing, which the billing consumer reads.
The dev database is leases_data. The role service_leases has to exist before the migration
Job can run, and its password has to match the service-leases-db-pw secret in Key Vault
kv-apps-flow-dev. First-time database user, secrets, and pipeline registration are in
docs/devops/deploying-a-service.md.
Tracing
The API supports opt-in OpenTelemetry export. Its configured internal HTTP clients propagate trace context and request IDs. Outbox events preserve trace context through Service Bus publication and consumption. See HTTP and messaging tracing for configuration, coverage, and local tests.