Overview
Garage provides S3-compatible object storage for the observability stack. It serves as the backend for Loki (log chunks) and Tempo (trace blocks), enabling persistent storage without external dependencies.Configuration
Nixidy Module (nixidy/env/local/garage.nix)
Storage Configuration
- Database: SQLite (single-node deployment)
- Replication factor: 1 (no redundancy in local dev)
- Metadata dir:
/var/lib/garage/meta(PV) - Data dir:
/var/lib/garage/data(PV)
Deployment
Garage runs as a StatefulSet:Persistent Volumes
| Volume | Size | Purpose |
|---|---|---|
meta | 512Mi | Cluster metadata and object index |
data | 4Gi | Object data (chunks and blocks) |
Service Ports
Garage exposes three services:| Port | Protocol | Purpose |
|---|---|---|
| 3900 | TCP | S3 API (object operations) |
| 3901 | TCP | RPC (cluster communication) |
| 3903 | TCP | Admin API (management, metrics) |
Service Endpoint
- S3 API:
http://garage.storage:3900 - Admin API:
http://garage.storage:3903 - Namespace:
storage
Setup Process
Garage requires initial configuration viagarage-setup.sh:
1. Apply Cluster Layout
dc1.
2. Create Access Key
- Access Key:
GK...(20+ chars) - Secret Key: Random string
3. Create Buckets
loki-chunks- Loki log storagetempo-traces- Tempo trace storage
4. Create Kubernetes Secrets
storagenamespace (for Garage itself)observabilitynamespace (for Loki and Tempo)
5. Encrypt Credentials (SOPS)
Health Checks
Readiness Probe
Liveness Probe
Resource Limits
Integration
Loki
Loki uses Garage for log chunk storage:garage-s3-credentials secret injected via extraEnvFrom
Tempo
Tempo uses Garage for trace block storage:garage-s3-credentials secret injected via extraEnvFrom
S3 Compatibility
Garage implements S3 API:- PutObject - Upload objects
- GetObject - Download objects
- DeleteObject - Remove objects
- ListObjects - List bucket contents
- HeadObject - Get object metadata
- MultipartUpload - Large object uploads
s3forcepathstyle: true)
Admin Operations
Check Cluster Status
List Buckets
View Key Info
Check Metrics
Configuration Details
RPC Settings
S3 Settings
Admin Settings
Storage Backend
Garage stores objects in two layers:- Metadata - SQLite database with object index
- Data blocks - Raw object data on disk