Files
zeekay fa82d04b44 feat(bootnode): API on Base/SQLite + Litestream→SeaweedFS, drop Postgres (#28)
* feat(bootnode): API on Base/SQLite + Litestream→SeaweedFS, drop Postgres

Move the bootnode API off Postgres onto its canonical Base/SQLite store
(HIP-0106), made durable by streaming the SQLite WAL to the Hanzo S3
(SeaweedFS) with Litestream.

- deployment-api.yaml:
  - Pin the API to the first Base/SQLite build of bootnode/bootnode main:
    ghcr.io/bootnode/bootnode:sha-759ef5a-amd64-api (immutable; never :latest).
    Registry moved to the bootnode org per the repo's hanzo.yml.
  - DATABASE_URL is now the literal sqlite+aiosqlite:////data/bootnode/bootnode.db
    on a mounted PVC — the Postgres `database-url` secret ref is gone, so there
    is no Postgres dependency.
  - Add a Litestream sidecar (replicate) + an init container (restore
    -if-db-not-exists) so a rescheduled pod rebuilds the DB from S3. Both read
    the S3 secret key from the shared hanzo-s3-secret (key `password`,
    access-key-id `hanzo`) — same secret luxd/lux-mpc use. No plaintext secrets.
  - Single writer: replicas 1 + Recreate strategy + required pod-anti-affinity,
    since one RWO PVC can have only one writer (HA = the S3 replica, not extra
    pods).
- storage.yaml (new): the bootnode-api-data PVC (10Gi do-block-storage) and the
  bootnode-litestream ConfigMap (s3.lux.network, bucket lux-snapshots, prefix
  bootnode; 10s WAL sync, 24h retention).
- kustomization.yaml: add storage.yaml; scope the image override to the API
  image and pin it to the immutable SHA tag (was rewriting both images to
  api-latest).

Renders clean via `kubectl kustomize k8s/bootnode`. Reviewable manifest only —
no kubectl apply / cutover.

* fix(bootnode): pin sha-1018c45 (Base/SQLite + k8s node-detector)

759ef5a was the SQLite-only commit; 1018c45 (main) adds the k8s
node-detector (#15) + the latent Cluster/Node model + aiosqlite fixes —
the detector is what makes lux.cloud/zoo.cloud actually show the
LuxNetwork/ZooChain validators, so the deployed image must be 1018c45.

* fix(bootnode): pin API image to platform tag format <full-sha>-amd64-api

platform.hanzo.ai (sole orchestrator after bootnode dropped cicd.yml in
#16) tags images `<full-40-char-commit-sha>-amd64-<suffix>`: the push
event's `after` SHA substituted verbatim by resolveTag (no shortening).
The PR pinned `sha-1018c45-amd64-api` — the old docker/metadata-action
GHA form, which platform never publishes (that path is now deleted).

Re-pin api to `d6a293fb…-amd64-api` (bootnode/bootnode main HEAD) in both
the kustomize `images:` transform and the deployment-api ref, and correct
the stale 'hanzoai/ci, sha-<short>' comment to the real platform format.
2026-07-26 15:46:01 -07:00

31 lines
948 B
YAML

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: bootnode
resources:
- namespace.yaml
- serviceaccount.yaml
- storage.yaml
- deployment-api.yaml
- deployment-web.yaml
- services.yaml
- ingress.yaml
labels:
- pairs:
app.kubernetes.io/part-of: lux-cloud
app.kubernetes.io/managed-by: lux-universe
includeSelectors: false
# Immutable pin to a Base/SQLite (VFS→SeaweedFS) build of main. Never :latest
# in prod. Bump the SHA when a newer main image is published. Images are built
# by platform.hanzo.ai (the sole orchestrator after cicd.yml was dropped), which
# tags each image `<full-40-char-commit-sha>-amd64-<suffix>` — the push event's
# `after` SHA, substituted verbatim (no shortening). Pinned to bootnode/bootnode
# main @ d6a293f.
images:
- name: ghcr.io/bootnode/bootnode
newName: ghcr.io/bootnode/bootnode
newTag: d6a293fb5f9398cc2ec571f6527e0948954dc21e-amd64-api