Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfmHGGiYUjNcvJoyzdf
7.4 KiB
Deployment handover: ins-landing-page
For: cluster manager. Date: 2026-12-01.
What this is
A single landing page for Infinity Networks Security's hotel technology services, with a lead form. Visitors submit name, work email, phone, company and the service they're interested in. Leads are stored in PostgreSQL and read by the sales team in DBeaver or as a CSV export. There is no admin UI.
- Public URL:
https://ins-landing.containerverse.dev - Repo:
gitea.containerverse.dev/ngqile/ins-landing-page, moving tosolvway/ins-landing-page - App: Node 22, one dependency (
pg), imagegitea.containerverse.dev/solvway/ins-landing-page:ins-landing-page-prd-latest - Deploy pattern: the same as dynamic-qr (Traefik Gateway API, cert-manager, Longhorn, Calico,
krrd.shrollout from CI)
What gets deployed
Everything lives in namespace ins-landing-page. Nothing outside it is changed.
| File | Contents |
|---|---|
k8s/00-namespace.yaml |
Namespace |
k8s/20-postgres.yaml |
Postgres 18 StatefulSet postgres (1 replica), Longhorn PVC ins-landing-page-postgres (2 Gi, RWO), headless Service postgres |
k8s/40-app.yaml |
Deployment ins-landing-page (1 replica, uid 1000, read-only root filesystem), init container waiting for Postgres, Service on port 3000 |
k8s/50-gateway.yaml |
Certificate ins-landing-page-tls (ClusterIssuer lets-encrypt, HTTP-01), Gateway (HTTP 8000 → redirect, HTTPS 8443), HTTPRoutes, Traefik Middleware lead-rate-limit |
k8s/60-network-policy.yaml |
Default deny; allows Traefik → app (3000), app → Postgres (5432), Traefik → ACME solver (8089) |
k8s/examples/secret.yaml |
Example only, never applied (k apply -f k8s/ does not recurse) |
Resource requests are small: app 20m CPU / 48 Mi (limit 192 Mi); Postgres 100m CPU / 128 Mi (limit 1 Gi).
The app creates its leads table itself on first start. There is no migration step. The schema is in docs/schema.sql for reference.
Before the first install
- Repo transfer. Move the repo to the
solvwayorg. CI needs the org secretsPACKAGE_USER,PACKAGE_RW_KEY,DRONECICD_SSH_USERNAME,DRONECICD_SSH_HOST,DRONECICD_SSH_KEY,TELEGRAM_TOKEN,TELEGRAM_TOand, optionally,MICROSOFT_TEAMS_WEBHOOK_URL: the same set as dynamic-qr. - Build the first image, after the transfer. The code is already on
main. The CI runs from before the transfer fail because the org secrets aren't available; ignore them. After the transfer, re-run the latest CI run onmain, or push any commit. CI runs the tests against a throwaway Postgres, then builds and pushes the image. On that first run the rollout step finds no Deployment and skips itself; that's expected. - DNS. Add
ins-landing.containerverse.devin Cloudflare, pointing at the cluster like the othercontainerverse.devhosts (proxied). - Backups. Please confirm before go-live. The leads are the only business data, and they live only on the
ins-landing-page-postgresvolume. These manifests set up no backup. Either confirm that a Longhorn recurring backup covers this volume, or schedule apg_dump.
First install
On the microk8s host (k = microk8s kubectl):
k apply -f k8s/00-namespace.yaml
# Database password. Hex only: it is embedded in a postgres:// URL.
k -n ins-landing-page create secret generic ins-landing-page-db \
--from-literal=POSTGRES_PASSWORD="$(openssl rand -hex 24)"
# Registry pull secret, as for dynamic-qr
k -n ins-landing-page create secret docker-registry regcred \
--docker-server=gitea.containerverse.dev --docker-username=<user> --docker-password=<token>
k apply -f k8s/
k -n ins-landing-page rollout status statefulset/postgres
k -n ins-landing-page rollout status deployment/ins-landing-page
Check it works
k -n ins-landing-page get pods # postgres-0 and ins-landing-page-… Running
k -n ins-landing-page get certificate # ins-landing-page-tls READY=True (can take a minute)
k -n ins-landing-page logs deploy/ins-landing-page # "listening on :3000"
curl -sI https://ins-landing.containerverse.dev/ # HTTP/2 200
curl -sI http://ins-landing.containerverse.dev/ # 301 to https
To check the form without creating a lead, submit it with a Gmail address. The page shows "Please use your work email…" and nothing is stored. A real test submission writes a row. If you make one, delete it afterwards, or tell sales to ignore it.
Updates
- Code: every push to
mainruns the tests, buildsins-landing-page-prd-latest, and rolls the Deployment through./krrd.sh ins-landing-page ins-landing-page. It's guarded the same way as dynamic-qr, so an older run never rolls back a newer commit. - Manifests: changes are applied by hand with
k apply -f k8s/. - Rollouts: the app pod sleeps 3 s before shutting down, so Traefik stops routing to it first and form posts aren't dropped.
Day-to-day operations
Logs: k -n ins-landing-page logs deploy/ins-landing-page. Only errors are logged, never lead data or passwords.
Export leads to CSV (read-only, times in Malaysia time):
k -n ins-landing-page exec -i postgres-0 -- psql -q -v ON_ERROR_STOP=1 -U ins -d ins -f - \
< docs/export-leads.sql > leads.csv
DBeaver access for sales or ops: Postgres is not exposed outside the cluster.
k -n ins-landing-page port-forward svc/postgres 15432:5432
# from another machine: ssh -L 15432:127.0.0.1:15432 <user>@<microk8s-host>
Connect to 127.0.0.1:15432, database ins, user ins. Get the password with k -n ins-landing-page get secret ins-landing-page-db -o jsonpath='{.data.POSTGRES_PASSWORD}' | base64 -d. Recommend a read-only connection in DBeaver: this is the live data.
Changing the database password: the password is read only when the database is first created. Run ALTER USER ins PASSWORD '<new>' in Postgres first, then update the secret and restart the app. Changing only the secret locks the app out, and it will crash-loop.
Things to know
- Rate limit.
POST /api/leadsallows 5 requests per minute per visitor (burst 5), keyed on the right-mostX-Forwarded-For, which Cloudflare sets. This assumes Traefik trusts that header only from Cloudflare, as it does for dynamic-qr's office-only middleware. If Cloudflare's proxy is turned off, all visitors share one limit. - Postgres. It runs as the
insuser, which also owns the database. Every query is parameterised. The image tag ispostgres:18, the major version only, as in dynamic-qr. - Personal data (PDPA). Leads contain names, emails and phone numbers. Keep CSV exports out of shared drives and delete them when done.
- Not wired yet. There are no metrics or alerts.
GET /is the only health signal; the probes use it.
Rollback
- App: the image tag is mutable (
…-prd-latest), so roll back by reverting the commit onmainand letting CI rebuild. In an emergency,k -n ins-landing-page scale deploy/ins-landing-page --replicas=0takes the page down without touching the data. - Data: never delete the PVC
ins-landing-page-postgreswithout a backup. Deleting the namespace deletes it.
Open items, not blocking the install
- Content placeholders on the page: follow-up timeframe, installation timeline, hotel photo. These are with the page owner.
- Backup confirmation (see above).
Contact
Questions about the app: the repo owner (ngqile). Full details: README.md in the repo.