overpass-api

by L4G

Helm chartv0.1.2App latestAGPL-3.0Verified publisher

A Helm chart for deploying Overpass API - OpenStreetMap query service

About this chart

Overpass API Helm Chart

Helm chart for deploying Overpass API - a powerful read-only API for querying OpenStreetMap data.

Features

  • Flexible Initialization - Support for both clone (fast) and init (from-scratch) modes
  • Resource Presets - Pre-configured sizes from city-level to full planet
  • Production Ready - Security hardening, health probes, resource management
  • High Availability - Pod disruption budgets, affinity rules, topology spread
  • Monitoring - Prometheus ServiceMonitor integration
  • Extensible - Extra volumes, environment variables, ConfigMaps/Secrets support

Quick Start

# Add the Helm repository
helm repo add l4gdev https://l4gdev.github.io/helm-charts
helm repo update

# Install with default settings (medium preset, clone mode)
helm install overpass l4gdev/overpass-api \
  --set config.cloneUrl="https://overpass-api.de/api/"

# Or install with a specific regional extract
helm install overpass l4gdev/overpass-api \
  --set config.mode=init \
  --set config.planetUrl="https://download.geofabrik.de/europe/poland-latest.osm.pbf" \
  --set resources.preset=small

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure
  • Sufficient storage for OSM data (see Resource Presets)

Installation

Basic Installation

helm install overpass l4gdev/overpass-api

Custom Values

helm install overpass l4gdev/overpass-api -f custom-values.yaml

With Ingress

helm install overpass l4gdev/overpass-api \
  --set ingress.enabled=true \
  --set ingress.hosts[0].host=overpass.example.com \
  --set ingress.hosts[0].paths[0].path=/ \
  --set ingress.hosts[0].paths[0].pathType=Prefix

Two-Phase Deployment with Init Job

The chart uses a two-phase deployment to prevent PVC multi-attach errors during initialization:

Phase 1: Initialize the database

helm install overpass l4gdev/overpass-api \
  --set initJob.enabled=true \
  --set config.mode=init \
  --set config.planetUrl=https://download.geofabrik.de/europe/luxembourg-latest.osm.bz2 \
  # Only .osm.bz2 files are supported

Wait for the init job to complete (this may take 10-60 minutes depending on data size). Monitor progress:

kubectl logs -f job/overpass-init

Phase 2: Start the API service

Once initialization completes, upgrade the release to start the StatefulSet:

helm upgrade overpass l4gdev/overpass-api \
  --set initJob.enabled=false \
  --reuse-values

The API service will now start and serve queries using the initialized database.

Configuration

Resource Presets

The chart provides pre-configured resource presets based on expected data coverage:

PresetUse CaseCPUMemoryStorage
microCity-level extracts1-22-4Gi10Gi
smallCountry-level extracts2-48-16Gi50Gi
mediumMulti-country regions4-816-32Gi150Gi
largeContinental extracts8-1632-64Gi400Gi
xlargeFull planet database16-3264-128Gi1Ti
customUser-defined resources---

Example:

resources:
  preset: small  # For Poland extract

Operational Modes

Clone Mode (Recommended for faster initialization)

Copies data from an existing Overpass instance:

config:
  mode: clone
  cloneUrl: "https://overpass-api.de/api/"
  diffUrl: "https://download.openstreetmap.fr/replication/europe/minute/"

Advantages: Faster (30 min - 2 hours), data arrives pre-indexed

Init Mode (From planet file)

Downloads and processes OSM data from scratch:

config:
  mode: init
  # Note: Only .osm.bz2 files are supported (not .osm.pbf)
  planetUrl: "https://download.geofabrik.de/europe/poland-latest.osm.bz2"
  diffUrl: "https://download.openstreetmap.fr/replication/europe/poland/minute/"

Advantages: Full control over data source, no dependency on existing instance

Common Configuration Examples

Regional Extract (Poland)

resources:
  preset: small

config:
  mode: init
  # Note: Only .osm.bz2 files are supported (not .osm.pbf)
  planetUrl: "https://download.geofabrik.de/europe/poland-latest.osm.bz2"
  diffUrl: "https://download.openstreetmap.fr/replication/europe/poland/minute/"
  meta: "yes"
  compression: "lz4"
  fastcgiProcesses: 4

Continental Extract (Europe)

resources:
  preset: large

config:
  mode: clone
  cloneUrl: "https://overpass-api.de/api/"
  diffUrl: "https://download.openstreetmap.fr/replication/europe/minute/"
  fastcgiProcesses: 8
  useAreas: true

Full Planet

resources:
  preset: xlarge

config:
  mode: clone
  cloneUrl: "https://overpass-api.de/api/"
  diffUrl: "https://planet.openstreetmap.org/replication/minute/"
  fastcgiProcesses: 16
  useAreas: false  # Very resource-intensive for planet

Parameters

Global Configuration

ParameterDescriptionDefault
global.storageClassGlobal storage class""

Image Configuration

ParameterDescriptionDefault
image.repositoryOverpass API Docker imagewiktorn/overpass-api
image.tagImage tag (defaults to chart appVersion)""
image.pullPolicyImage pull policyIfNotPresent
imagePullSecretsImage pull secrets[]

Overpass Configuration

ParameterDescriptionDefault
config.modeOperational mode: clone or initclone
config.metaMetadata handling: yes, attic, noyes
config.compressionDatabase compression: no, gz, lz4lz4
config.fastcgiProcessesNumber of FastCGI processes4
config.rateLimitConcurrent connections per IP2
config.maxTimeoutQuery timeout (seconds)1000
config.useAreasEnable area generationfalse
config.rulesLoadArea generation work/sleep ratio10
config.updateSleepSeconds between update checks3600
config.planetUrlPlanet file URL (init mode)""
config.diffUrlDiff repository URL""
config.cloneUrlClone source URL (clone mode)""
config.planetPreprocessPreprocessing command for planet file""
config.diffPreprocessPreprocessing command for diff updates""
config.cookieJarCookie jar contents for authenticated downloads""
config.useOAuthCookieEnable OAuth cookie clientfalse
config.stopAfterInitStop container after initializationtrue
config.allowDuplicateQueriesAllow duplicate queries from same IPfalse
config.healthcheckCustom health check command""

Persistence

ParameterDescriptionDefault
persistence.enabledEnable persistent storagetrue
persistence.storageClassStorage class""
persistence.accessModesAccess modes[ReadWriteOnce]
persistence.sizeStorage size (auto from preset)""
persistence.existingClaimUse existing PVC""

Service

ParameterDescriptionDefault
service.typeService typeClusterIP
service.portService port80
service.annotationsService annotations{}

Ingress

ParameterDescriptionDefault
ingress.enabledEnable ingressfalse
ingress.classNameIngress class name""
ingress.annotationsIngress annotations{}
ingress.hostsIngress hosts configurationSee values.yaml
ingress.tlsTLS configuration[]

Monitoring

ParameterDescriptionDefault
monitoring.serviceMonitor.enabledEnable Prometheus ServiceMonitorfalse
monitoring.serviceMonitor.intervalScrape interval30s
monitoring.serviceMonitor.scrapeTimeoutScrape timeout10s

See values.yaml for complete parameter reference.

Monitoring

Health Probes

The chart includes health probes for service monitoring:

  • Liveness Probe: Checks if the API is responsive
  • Readiness Probe: Validates API availability for traffic
  • Startup Probe: Handles initial startup delay

Prometheus Integration

Enable Prometheus monitoring:

monitoring:
  serviceMonitor:
    enabled: true
    interval: 30s

Troubleshooting

Check Initialization Status

# View init job status
kubectl get jobs overpass-init

# View init job logs
kubectl logs -f job/overpass-init

# Check if database is initialized
kubectl exec overpass-0 -- ls -la /db/.initialized

Check StatefulSet Status

# View pod status
kubectl get pods -l app.kubernetes.io/name=overpass-api

# View pod logs
kubectl logs -f overpass-0

# Check resource usage
kubectl top pod overpass-0

Common Issues

Init job takes too long:

  • Clone mode: Check network connectivity to clone source
  • Init mode: Expected for large extracts (hours to days for planet)
  • Monitor progress: kubectl logs -f job/overpass-init

Pod not starting:

  • Check PVC binding: kubectl get pvc
  • Verify resource availability: kubectl describe pod overpass-0
  • Review logs: kubectl logs overpass-0

API queries failing:

  • Verify initialization completed: kubectl exec overpass-0 -- ls /db/nodes.bin
  • Check probe status: kubectl describe pod overpass-0
  • Review configuration: kubectl get cm overpass -o yaml

Upgrading

helm upgrade overpass l4gdev/overpass-api

The chart uses safe defaults and preserves PVCs across upgrades.

Uninstalling

# Uninstall the release
helm uninstall overpass

# Optionally delete PVC (data will be lost!)
kubectl delete pvc overpass

Examples

See the examples/ directory for complete configuration examples:

  • values-minimal.yaml - Minimal configuration
  • values-regional.yaml - Regional extract setup
  • values-planet.yaml - Full planet deployment

Development

Prerequisites

  • Kubernetes cluster (minikube, kind, k3s, or cloud provider)
  • kubectl configured
  • Helm 3.2.0+

Testing

# Lint the chart
helm lint charts/overpass-api

# Template rendering
helm template test charts/overpass-api

# Install locally
helm install test charts/overpass-api --dry-run --debug

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: helm lint charts/overpass-api
  5. Submit a pull request

License

This Helm chart is licensed under the MIT License. See LICENSE for details.

The Overpass API software itself is licensed under AGPL-3.0.

Links

Credits

Developed and maintained by L4G Team.

Based on the excellent work of:

Deploy overpass-api with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has overpass-api on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartoverpass-api is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply