Operations
Index CRD
An Index represents one namespace exposed through the gateway. It
declares which upstream namespace to use, snapshot policy, cache
posture, and consistency mode. The backend connection itself lives in a
VectorStore.
apiVersion: hevlayer.com/v1
kind: Index
metadata:
name: products
namespace: layer
spec:
backend:
storeRef: turbopuffer-default
namespace: products
distanceMetric: cosine_distance
metadata:
labels:
app: shop
tags:
- catalog
snapshot:
interval: 5m
retention: never
facetFields:
- category
- brand
scan:
threads: 8
cache:
ttl: 24h
capGiB: 64
mode: standard
consistency: strong
Backend
| Field | Purpose |
|---|---|
backend.storeRef | Optional VectorStore name in the same namespace. The gateway routes requests for this upstream namespace to that store. Defaults to the namespace’s default store. |
backend.namespace | Optional upstream namespace override. Defaults to the Index name. |
backend.distanceMetric | Vector metric, default cosine_distance. |
Snapshot policy
| Field | Default | Purpose |
|---|---|---|
snapshot.facetFields | [] | Fields the gateway materializes into durable facet snapshots. Empty disables the automatic writer. |
snapshot.interval | 5m | Minimum spacing between automatic snapshot writes after upstream-stable advances. |
snapshot.retention | never | never keeps all snapshot bodies; a duration such as 30d prunes older bodies while keeping the latest. |
Scan policy
scan.threads sets the per-namespace default for origin scan fan-out:
the maximum concurrent upstream requests one scan may issue during
scatter/gather. It defaults to 8 and is clamped by the gateway’s server
cap and the active shard count. Request-level threads overrides this
default for one scan.
Cache policy
Aerospike remains an ephemeral cache; durable snapshot history stays in S3. Cache warming uses the same scan fan-out policy as other origin scans.
Status
The operator reports observed generation, metadata sync state, and
conditions. status.snapshot.lastRun and lastSuccess are reserved for
the gateway history bridge.