Simple demo app using rook/ceph and CloudNativePG
  • Go 61.5%
  • JavaScript 14.4%
  • CSS 12%
  • HTML 8.4%
  • Makefile 2.2%
  • Other 1.5%
Find a file
Henk Batelaan 0af5a20ba3
All checks were successful
push-images / build-push (push) Successful in 28s
push-images / deploy (push) Successful in 16s
fix(ui): reload page after repeated failed status polls
2026-11-25 10:15:20 +01:00
.forgejo/workflows ci: forgejo pipeline for build push and deploy 2026-11-24 14:13:12 +01:00
app fix(ui): reload page after repeated failed status polls 2026-11-25 10:15:20 +01:00
deploy/fundament feat(k8s): manifests and fundament overlay with gateway and dns 2026-11-24 14:13:12 +01:00
k8s fix: manual action texts and Europe/Amsterdam timezone 2026-11-25 09:21:51 +01:00
.gitignore feat(app): go service for visible read write on ceph and cloudnativepg 2026-11-24 14:13:12 +01:00
Makefile build: makefile for local build test and run 2026-11-24 14:13:28 +01:00
README.md docs: shorten README 2026-11-24 15:00:12 +01:00

KVK Storage Demo

Demo-app voor het KVK Kubernetes-lab. De app laat zien hoe bestanden op Ceph RBD en records in managed PostgreSQL (CloudNativePG) worden geschreven en gelezen. Data en tellers blijven na een herstart van de app-pod behouden.

Gebruik

Het dashboard pollt de opslagstatus elke 3 seconden. De backend leest elke 15 seconden data terug en schrijft standaard elke 5 minuten automatisch naar beide stores. Gebruik de knoppen voor handmatige lees- en schrijfacties; kies ×10 voor een burst naar Ceph. De kaarten tonen data en latency.

Publieke demo: kvk-demo-storage.cluster-c.fieldlab2026.nl

Lokaal draaien

Vereist: Go 1.26+.

make run

De UI is beschikbaar op http://localhost:8080. De app gebruikt ./data en draait zonder database; de PostgreSQL-kaart is dan onbereikbaar. Configureer een database via DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD, DB_SSLMODE en DB_SSLROOTCERT. Zonder database is alleen DATA_DIR nodig.

Tests en statische checks:

make test

Deployment

De Forgejo-pipeline push-images.yml bouwt en deployt na een push naar main of een v*-tag. Daarvoor zijn de secrets REGISTRY_USER, REGISTRY_TOKEN en FUNCTL_MAIN nodig. De namespace moet vooraf bestaan; het cluster levert CloudNativePG, Ceph en Gateway API.

De basis staat in k8s/ en de cluster-overlay in deploy/fundament/. Render de overlay lokaal met make render.

Beveiliging en randvoorwaarden

De app draait als non-root met read-only root filesystem, beperkte capabilities en zonder gemounte serviceaccounttoken. Databasecredentials komen uit CNPG secrets. Schrijfverzoeken zijn beperkt tot 4 KiB en 60 per minuut per bronadres (in-memory, per pod).

Dit is een publiek toegankelijke labdemo zonder authenticatie of gevoelige data. Bescherm de route met gatewaybeleid of authenticatie voordat je de app voor andere data gebruikt.